---
title: "Add auth keys"
method: POST
path: "/authKeys/add"
tags: ["AuthKeys"]
---

# Add auth keys

`POST /authKeys/add`

## Request body

- object
  - `uuid` string, uuid
  - `authkey` string
  - `expiration` integer — 0 or UNIX timestamp
  - `user_id` integer
  - `comment` string

## Response `200`

Auth key response

- AuthKey
  - `id` integer
  - `uuid` string, uuid
  - `authkey` string
  - `authkey_start` string
  - `authkey_end` string
  - `created` integer — UNIX timestamp
  - `expiration` integer — 0 or UNIX timestamp
  - `user_id` integer
  - `comment` string
  - `user` User
    - `id` integer
    - `uuid` string, uuid
    - `username` string
    - `role_id` integer
    - `individual_id` integer
    - `disabled` boolean
    - `created` string, datetime
    - `modified` string, datetime
    - `organisation_id` integer
    - `organisation` Organisation
      - `id` integer
      - `uuid` string, uuid
      - `name` string
      - `url` string
      - `nationality` string, nullable
      - `sector` string, nullable
      - `type` string, nullable
      - `contacts` string, nullable
      - `created` string, datetime
      - `modified` string, datetime
      - `tags` Tag[]
        - `id` integer
        - `name` string
        - `namespace` string, nullable
        - `predicate` string, nullable
        - `value` string, nullable
        - `colour` string
        - `text_colour` string
        - `counter` integer
        - `created` string, datetime
        - `modified` string, datetime
      - `aligments` Alignment[]
    - `individual` Individual
      - `id` integer
      - `uuid` string, uuid
      - `email` string, email
      - `first_name` string
      - `last_name` string
      - `full_name` string
      - `position` string
      - `tags` Tag[]
        - `id` integer
        - `name` string
        - `namespace` string, nullable
        - `predicate` string, nullable
        - `value` string, nullable
        - `colour` string
        - `text_colour` string
        - `counter` integer
        - `created` string, datetime
        - `modified` string, datetime
      - `aligments` Alignment[]
      - `created` string, datetime
      - `modified` string, datetime
    - `role` Role
      - `id` integer
      - `name` string
      - `is_default` boolean
      - `perm_admin` boolean
      - `perm_sync` boolean
      - `perm_org_admin` boolean

## Other responses

- `403` — Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.
- `405` — Method not allowed. Your User Role is not allowed to access this resource.
- `default` — Unexpected API error

---

[API](https://skmtc.net/cerebrate-project/apis/cerebrate-project-api.md) · [All operations](https://skmtc.net/cerebrate-project/apis/cerebrate-project-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cerebrate-project/cerebrate-project-api/revisions/50eb2c1b04b4/schema)
