# Projects

## The Project object

A project is where all of the user, subscription, plan, device, and SIM information lives.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `object` | string | Yes | Type of object is always `project`. |
| `id` | string | Yes | Globally unique identifier for the project. |
| `billing` | object,null | Yes | Configuration parameters for the project use of billing. Present when the Billing API is enabled. |
| `consent` | object,null | Yes | Configuration parameters for the project's user consent collection. When absent, user consent is not checked or required.  <!-- theme: info --> > #### Preview > > This property is currently in preview and might change in the future. > > We’re excited to hear your feedback and ideas. Please send an email > to [support@gigs.com](mailto:support@gigs.com) to share your thoughts.  |
| `createdAt` | string | Yes | Time when the project was created. |
| `image` | string,null | Yes | Small-resolution project icon with an aspect ratio of `1:1`.  <!-- theme: info --> > #### Preview > > This property is currently in preview and might change in the future. > > We’re excited to hear your feedback and ideas. Please send an email > to [support@gigs.com](mailto:support@gigs.com) to share your thoughts.  |
| `legal` | object,null | Yes | The legal address for the company that manages the project. |
| `locales` | string[] | Yes | List of supported locales represented as [IETF language tags](https://en.wikipedia.org/wiki/IETF_language_tag), ordered by preference. |
| `name` | string | Yes | A human-readable name for the project. |
| `organization` | object | Yes |  |
| `payments` | object,null | Yes | Configuration parameters for the project use of payments. |
| `subscriptionOwner` | user | company | Yes | Indicates which entity will be registered as the owner of the subscription with the providers. When `company` is selected the legal address associated with the project will be used for the registration. |
| `support` | object,null | Yes | Contact details for consumer support requests regarding the project. |
| `tax` | object,null | Yes | Tax configuration for the project. |
| `type` | live | test | Yes | Indicates whether this is a live or test project. In live projects, subscriptions are invoiced to your organization, and any payments and taxes are real. The type cannot be changed after project creation. |

---

## List all projects

`GET /projects`

Returns a list of projects. The projects returned are sorted by creation date, with the most recently created projects appearing first.

### Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `organization` | string | No | The unique identifier for the organization to be filtered by. |
| `after` | string | No | A cursor for use in pagination. The `after` parameter takes an object ID that defines the position in the list, only items immediately following the item with that ID will be returned. |
| `before` | string | No | A cursor for use in pagination. The `before` parameter takes an object ID that defines the position in the list, only items immediately preceding the item with that ID will be returned. |
| `limit` | integer | No | The limit of items to be returned in the list, between 0 and 200. |

### Responses

#### 200 — Returns a dictionary with an items property that contains an array of projects.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `object` | string | Yes | Type of object is always `list`. |
| `items` | object[] | Yes | List of objects of type `project`. |
| `moreItemsAfter` | string,null | Yes | A unique identifier to be used as `after` pagination parameter if more items are available sorted after the current batch of items. |
| `moreItemsBefore` | string,null | Yes | A unique identifier to be used as `before` pagination parameter if more items are available sorted before the current batch of items. |

#### 422 — The request can't be processed, often due to an invalid parameter or incompatible system state.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `object` | string | Yes | Type of object is always `error`. |
| `code` | string | No | An optional machine-readable description of the error. Present for errors that could be handled programmatically. |
| `details` | object[] | No | Optional array containing specific information for the current error.  <!-- theme: info --> > #### Preview > > This property is currently in preview and might change in the future. > > We’re excited to hear your feedback and ideas. Please send an email > to [support@gigs.com](mailto:support@gigs.com) to share your thoughts.  |
| `documentation` | string[] | No | An optional list of URLs providing further information to resolve the error. |
| `hint` | string | No | An optional explanation how to resolve the error. |
| `message` | string | Yes | A human readable description of the error. |
| `type` | string | Yes | The type of [error](https://developers.gigs.com/api/error-handling) returned. |

---

## Retrieve a project

`GET /projects/{project}`

Retrieves the details of an existing project accessible by the API client.

### Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project` | string | Yes | The unique identifier for the [project](https://developers.gigs.com/core/projects#the-project-resource). |

### Responses

#### 200 — Returns the project object if it exists.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `object` | string | Yes | Type of object is always `project`. |
| `id` | string | Yes | Globally unique identifier for the project. |
| `billing` | object,null | Yes | Configuration parameters for the project use of billing. Present when the Billing API is enabled. |
| `consent` | object,null | Yes | Configuration parameters for the project's user consent collection. When absent, user consent is not checked or required.  <!-- theme: info --> > #### Preview > > This property is currently in preview and might change in the future. > > We’re excited to hear your feedback and ideas. Please send an email > to [support@gigs.com](mailto:support@gigs.com) to share your thoughts.  |
| `createdAt` | string | Yes | Time when the project was created. |
| `image` | string,null | Yes | Small-resolution project icon with an aspect ratio of `1:1`.  <!-- theme: info --> > #### Preview > > This property is currently in preview and might change in the future. > > We’re excited to hear your feedback and ideas. Please send an email > to [support@gigs.com](mailto:support@gigs.com) to share your thoughts.  |
| `legal` | object,null | Yes | The legal address for the company that manages the project. |
| `locales` | string[] | Yes | List of supported locales represented as [IETF language tags](https://en.wikipedia.org/wiki/IETF_language_tag), ordered by preference. |
| `name` | string | Yes | A human-readable name for the project. |
| `organization` | object | Yes |  |
| `payments` | object,null | Yes | Configuration parameters for the project use of payments. |
| `subscriptionOwner` | user | company | Yes | Indicates which entity will be registered as the owner of the subscription with the providers. When `company` is selected the legal address associated with the project will be used for the registration. |
| `support` | object,null | Yes | Contact details for consumer support requests regarding the project. |
| `tax` | object,null | Yes | Tax configuration for the project. |
| `type` | live | test | Yes | Indicates whether this is a live or test project. In live projects, subscriptions are invoiced to your organization, and any payments and taxes are real. The type cannot be changed after project creation. |

#### 404 — The requested resource doesn't exist.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `object` | string | Yes | Type of object is always `error`. |
| `code` | string | No | An optional machine-readable description of the error. Present for errors that could be handled programmatically. |
| `details` | object[] | No | Optional array containing specific information for the current error.  <!-- theme: info --> > #### Preview > > This property is currently in preview and might change in the future. > > We’re excited to hear your feedback and ideas. Please send an email > to [support@gigs.com](mailto:support@gigs.com) to share your thoughts.  |
| `documentation` | string[] | No | An optional list of URLs providing further information to resolve the error. |
| `hint` | string | No | An optional explanation how to resolve the error. |
| `message` | string | Yes | A human readable description of the error. |
| `type` | string | Yes | The type of [error](https://developers.gigs.com/api/error-handling) returned. |

---

## Retrieve the project credentials

`GET /projects/{project}/credentials`

Retrieve the credentials of an existing project.

> **Info**
> #### Preview
> 
>  This endpoint is currently in preview and might change in the future.
> 
>  We’re excited to hear your feedback and ideas. Please send an email
>  to [support@gigs.com](mailto:support@gigs.com) to share your thoughts.

### Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project` | string | Yes | The unique identifier for the [project](https://developers.gigs.com/core/projects#the-project-resource). |

### Responses

#### 200 — Returns the project credentials.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `object` | string | Yes | Type of object is always `projectCredentials`. |
| `paymentsKey` | string,null | Yes | Publishable API key for payment integration. |

#### 404 — The requested resource doesn't exist.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `object` | string | Yes | Type of object is always `error`. |
| `code` | string | No | An optional machine-readable description of the error. Present for errors that could be handled programmatically. |
| `details` | object[] | No | Optional array containing specific information for the current error.  <!-- theme: info --> > #### Preview > > This property is currently in preview and might change in the future. > > We’re excited to hear your feedback and ideas. Please send an email > to [support@gigs.com](mailto:support@gigs.com) to share your thoughts.  |
| `documentation` | string[] | No | An optional list of URLs providing further information to resolve the error. |
| `hint` | string | No | An optional explanation how to resolve the error. |
| `message` | string | Yes | A human readable description of the error. |
| `type` | string | Yes | The type of [error](https://developers.gigs.com/api/error-handling) returned. |

---
