---
title: "Get an Organization Token"
description: "Learn how to retrieve an organization token using the API."
canonical_url: "https://cobalt-io.brainfish.ai/articles/get-an-organization-token-RlqtesM1QN"
md_url: "https://cobalt-io.brainfish.ai/articles/get-an-organization-token-RlqtesM1QN.md"
---
# Get an Organization Token

Learn how to retrieve an organization token using the API.


:::info
Because most API calls are scoped to a specific [organization](https://docs.cobalt.io/en-us/articles/organization-wf0ajzqU7L), you also need an organization token to send API requests.

:::

To get an organization token:


1. [Create a personal API token](https://docs.cobalt.io/en-us/articles/create-a-personal-cobalt-api-token-LT9Nl8EAVR).
2. Send a request to retrieve all organizations you belong to. Replace YOUR-PERSONAL-API-TOKEN with your token.

   ```javascript
   curl -X GET "https://api.cobalt.io/orgs" \
       -H "Accept: application/vnd.cobalt.v2+json" \
       -H "Authorization: Bearer YOUR-PERSONAL-API-TOKEN" \
       | jq .
   
   ```
3. From the output, save the token value for the desired organization. In our API documentation, you’ll see this as YOUR-V2-ORGANIZATION-TOKEN.

   Example response:

   ```javascript
   {
     "data": [
       {
         "resource": {
           "id": "some_id",
           "name": "Name of your organization",
           "token": "YOUR-V2-ORGANIZATION-TOKEN"
         },
         "links": {
           "ui": {
             "url": "https://api.cobalt.io/links/link-to-web-app"
           }
         }
       }
     ],
     "pagination": {
       "next_page": "/orgs?cursor=a1b2c3d4",
       "prev_page": "/orgs?cursor=4d3c2b1a"
     }
   }
   
   ```

Include the organization token in the X-Org-Token header of your requests.

```javascript
-H "X-Org-Token: YOUR-V2-ORGANIZATION-TOKEN"
```

For more information, see our API reference documentation on the [organizations](https://docs.cobalt.io/en-us/articles/organizations-ZCOwOVa80l) endpoint.
