# Avetta Authentication API

**Canonical:** https://apis.io/apis/avetta/avetta-authentication-api/  
**Provider:** Avetta — https://apis.io/providers/avetta/  
**Base URL:** https://api.avetta.com  
**Documentation:** https://docs.api.avetta.com

Avetta Authentication API is one of 96 APIs that [Avetta](https://apis.io/providers/avetta/) publishes on the [APIs.io](https://apis.io/) network, described by a machine-readable OpenAPI specification. This API exposes 17 JSON Schema definitions. Tagged areas include Authentication. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and 17 JSON Schemas.

## How to authenticate Every request to the Avetta APIs must include an `Authorization` header. You can fill it in using **one** of two methods. Pick the one that fits your integration; you do not need both. <table style="width: 100%; table-layout: fixed;"> <colgroup> <col style="width: 20%;"> <col style="width: 40%;"> <col style="width: 40%;"> </colgroup> <thead> <thead> <tr> <th></th> <th>Option A: OAuth 2.0 Bearer Token</th> <th>Option B: API Key</th> </tr> </thead> <tbody> <tr> <td><strong>Best for</strong></td> <td>Integrations that prefer a more secure authentication model using short-lived tokens</td> <td>Existing integrations already set up with an API key</td> </tr> <tr> <td><strong>Works with</strong></td> <td>All endpoints</td> <td>All endpoints</td> </tr> <tr> <td><strong>Steps</strong></td> <td>2 steps: get a token, then send the token</td> <td>1 step: send your key</td> </tr> <tr> <td><strong>Expires</strong></td> <td>Yes, after <code>expires_in</code> seconds (typically 3600 = 1 hour)</td> <td>No</td> </tr> <tr> <td><strong>Header value</strong></td> <td><code>Bearer &lt;ACCESS_TOKEN&gt;</code></td> <td><code>apikey &lt;API_KEY&gt;</code></td> </tr> </tbody> </table> ### Before you start - You need credentials from Avetta. If you don't have them, contact [APISupport@avetta.com](mailto:APISupport@avetta.com). - Your credentials are your Avetta **`accountId`** and **`apikey`**. --- ## Option A: OAuth 2.0 Bearer Token This method takes two steps: first trade your credentials for a temporary access token, then send that token on each request. ### Step 1: Get an access token Send a `POST` request to `https://api.avetta.com/auth/v1/token`: ```bash curl --request POST 'https://api.avetta.com/auth/v1/token' \ --header 'Content-Type: application/json' \ --data '{ "grant_type": "client_api_credentials", "username": "<CLIENT_ID>", "password": "<CLIENT_SECRET>" }' ``` | Field | What to put in it | |---|---| | `grant_type` | Always `client_api_credentials` | | `username` | Your `accountId` | | `password` | Your `apikey` | A successful response looks like this: ```json { "access_token": "<ACCESS_TOKEN>", "token_type": "Bearer", "expires_in": 3600 } ``` Copy the value of `access_token`. You will use it in Step 2. ### Step 2: Send the token on each request Add this header to every request: ``` Authorization: Bearer <ACCESS_TOKEN> ``` **Example** ```bash curl 'https://api.avetta.com/api/v1/connections' \ --header 'Authorization: Bearer <ACCESS_TOKEN>' ``` ### When the token expires - The token stops working after `expires_in` seconds (typically 3600 seconds, or 1 hour). - There is no refresh token. To keep going, repeat **Step 1** to get a new token. - Tip: request a new token shortly before the old one expires so requests don't fail. --- ## Option B: API Key Add this header to **every** request: ``` Authorization: apikey <API_KEY> ``` Replace `<API_KEY>` with your `apikey`. Keep the word `apikey` and the space before your key. **Example** ```bash curl 'https://api.avetta.com/api/v1/connections' \ --header 'Authorization: apikey <API_KEY>' ```

## Operations (1)

| Method | Path | Summary |
|---|---|---|
| POST | `/auth/v1/token` | Get Access Token v1 |

## Machine-readable artifacts (21)

- **OpenAPI** — https://raw.githubusercontent.com/api-evangelist/avetta/refs/heads/main/openapi/avetta-authentication-api-openapi.yml
- **Documentation** — https://docs.connect.avetta.com/
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/avetta/refs/heads/main/json-schema/avetta-1-0-0-supplier-profile-schema.json
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/avetta/refs/heads/main/json-schema/avetta-1-0-0-get-workflow-response-schema.json
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/avetta/refs/heads/main/json-schema/avetta-1-0-0-supplier-profiles-schema.json
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/avetta/refs/heads/main/json-schema/avetta-1-0-0-create-work-request-request-schema.json
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/avetta/refs/heads/main/json-schema/avetta-1-0-0-worker-open-work-requests-summary-schema.json
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/avetta/refs/heads/main/json-schema/avetta-1-0-0-get-work-request-questions-response-schema.json
- **Documentation** — https://docs.pegasus.avetta.com/
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/avetta/refs/heads/main/json-schema/avetta-3-29-14-integrate-employee-resource-schema.json
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/avetta/refs/heads/main/json-schema/avetta-3-29-14-employee-resource-schema.json
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/avetta/refs/heads/main/json-schema/avetta-3-29-14-worker-resource-schema.json
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/avetta/refs/heads/main/json-schema/avetta-3-29-14-competency-resource-schema.json
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/avetta/refs/heads/main/json-schema/avetta-3-29-14-scope-permission-resource-schema.json
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/avetta/refs/heads/main/json-schema/avetta-3-29-14-client-company-registration-resource-schema.json
- **Documentation** — https://docs.worker.avetta.com/
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/avetta/refs/heads/main/json-schema/avetta-stats-schema-schema.json
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/avetta/refs/heads/main/json-schema/avetta-request-structure-refresh-schema.json
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/avetta/refs/heads/main/json-schema/avetta-request-structure-password-schema.json
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/avetta/refs/heads/main/json-schema/avetta-request-wmconnect-schema.json
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/avetta/refs/heads/main/json-schema/avetta-sites-message-response-schema.json

## Other Avetta APIs (12)

- [Avetta Developer API](https://apis.io/apis/avetta/avetta-developer-api/)
- [Avetta Account API](https://apis.io/apis/avetta/avetta-account-api/)
- [Avetta Accounts API](https://apis.io/apis/avetta/avetta-accounts-api/)
- [Avetta Admin API](https://apis.io/apis/avetta/avetta-admin-api/)
- [Avetta Auth API](https://apis.io/apis/avetta/avetta-auth-api/)
- [Avetta Compliance API](https://apis.io/apis/avetta/avetta-compliance-api/)
- [Avetta Countries API](https://apis.io/apis/avetta/avetta-countries-api/)
- [Avetta Credit API](https://apis.io/apis/avetta/avetta-credit-api/)
- [Avetta Deprecated Endpoints API](https://apis.io/apis/avetta/avetta-deprecated-endpoints-api/)
- [Avetta Event API](https://apis.io/apis/avetta/avetta-event-api/)
- [Avetta Events API](https://apis.io/apis/avetta/avetta-events-api/)
- [Avetta Languages API](https://apis.io/apis/avetta/avetta-languages-api/)

## Tags

Authentication

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/avetta/avetta-authentication-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/avetta/.
