Skip to main content
Products
Wade Williams avatar
Written by Wade Williams
Updated over a week ago

Overview

The products API gives you a number of ways to interact with products you're managing in Sprint.ly. You can fetch all products you're a member of, a product by their unique identifier, create new products, archive products, etc. from these endpoints.

/api/products.json

This endpoint will return all of the products you are a member of. Additionally, it allows you to create new products via the API, if you are an account owner.

GET

Sending an HTTP GET request will return all products you are a member of. Additionally, it will return information about your role in that product.

Arguments

This endpoint takes no arguments.

Example Response

[
  {
    "archived": true,
    "name": "Archived Project",
    "admin": true,
    "created_at": "2012-11-14T01:37:47+00:00",
    "id": 1234,
    "webhook": "https://sprint.ly/product/1234/commits/8X54nuqvjxFG3YwWakEvsp11Byqxw7FR",
    "email": {
      "tests": "tests-1234@items.sprint.ly",
      "tasks": "tasks-1234@items.sprint.ly",
      "stories": "stories-1234@items.sprint.ly",
      "defects": "defects-1234@items.sprint.ly",
      "backlog": "backlog-1234@items.sprint.ly"
    }
  },
  {
    "archived": false,
    "name": "Active Project",
    "admin": true,
    "created_at": "2014-09-16T23:36:00+00:00",
    "id": 5678,
    "webhook": "https://sprint.ly/product/5678/commits/G57DnuqvjsFG3YwY3kEvsp11y7qxw7GH",
    "email": {
      "tests": "tests-5678@items.sprint.ly",
      "tasks": "tasks-5678@items.sprint.ly",
      "stories": "stories-5678@items.sprint.ly",
      "defects": "defects-5678@items.sprint.ly",
      "backlog": "backlog-5678@items.sprint.ly"
    }
  }
] 

POST

By sending an HTTP POST to /api/products.json, you can easily create new products via the API. This could, for instance, let you create a new product when you create a new repository or add a new client. It will return the product record that you have just created. NOTE: The user making this API request must be an admin of the product or the account holder who created the product.

Arguments

  • name (string): The name of the new product you wish to create.

Example Response

{
    "archived": true,
    "name": "Archived Project",
    "admin": true,
    "created_at": "2012-11-14T01:37:47+00:00",
    "id": 1234,
    "webhook": "https://sprint.ly/product/1234/commits/8X54nuqvjxFG3YwWakEvsp11Byqxw7FR",
    "email": {
        "tests": "tests-1234@items.sprint.ly",
        "tasks": "tasks-1234@items.sprint.ly",
        "stories": "stories-1234@items.sprint.ly",
        "defects": "defects-1234@items.sprint.ly",
        "backlog": "backlog-1234@items.sprint.ly"
    }
}

Error Codes

  • 403 If you do not own a paying account you will not be able to use this endpoint.

  • 400 The name argument is required for all requests to this endpoint.

/api/products/{product_id}.json

This endpoint will return a specific product by ID.

GET

The /api/products.json endpoint returns a list of products. Each product dict includes an id, which is the unique identifier of the respective product. You can then use this id to fetch a single product via this endpoint.

Arguments

This endpoint takes no arguments.

Example Response

{
    "archived": true,
    "name": "Archived Project",
    "admin": true,
    "created_at": "2012-11-14T01:37:47+00:00",
    "id": 1234,
    "webhook": "https://sprint.ly/product/1234/commits/8X54nuqvjxFG3YwWakEvsp11Byqxw7FR",
    "email": {
        "tests": "tests-1234@items.sprint.ly",
        "tasks": "tasks-1234@items.sprint.ly",
        "stories": "stories-1234@items.sprint.ly",
        "defects": "defects-1234@items.sprint.ly",
        "backlog": "backlog-1234@items.sprint.ly"
    }
}

POST

Allows you to update the name of your product. You can also use this endpoint to mark a product as archived or to unarchive it.

Arguments

  • name (string): The name of the new product you wish to create.

  • archived (boolean): y to archive the product or n to unarchive the product.

Example Response

{
    "archived": true,
    "name": "Archived Project",
    "admin": true,
    "created_at": "2012-11-14T01:37:47+00:00",
    "id": 1234,
    "webhook": "https://sprint.ly/product/1234/commits/8X54nuqvjxFG3YwWakEvsp11Byqxw7FR",
    "email": {
        "tests": "tests-1234@items.sprint.ly",
        "tasks": "tasks-1234@items.sprint.ly",
        "stories": "stories-1234@items.sprint.ly",
        "defects": "defects-1234@items.sprint.ly",
        "backlog": "backlog-1234@items.sprint.ly"
    }
}

DELETE

Sending an HTTP DELETE to this endpoint will mark the respective product as archived. It will return the product record of the product you are archiving. NOTE: The user making this API request must be an admin of the product or the account holder who created the product.

Arguments

This endpoint takes no arguments.

Example Response

{
    "archived": true,
    "name": "Archived Project",
    "admin": true,
    "created_at": "2012-11-14T01:37:47+00:00",
    "id": 1234,
    "webhook": "https://sprint.ly/product/1234/commits/8X54nuqvjxFG3YwWakEvsp11Byqxw7FR",
    "email": {
        "tests": "tests-1234@items.sprint.ly",
        "tasks": "tasks-1234@items.sprint.ly",
        "stories": "stories-1234@items.sprint.ly",
        "defects": "defects-1234@items.sprint.ly",
        "backlog": "backlog-1234@items.sprint.ly"
    }
} 
Did this answer your question?