Auth

The Auth endpoint manages Bluebricks' long-lived API tokens.

post

Generate api key

🔒 Requires the create:organization_api_key permission

Authorizations
Body
namestringOptional

Name of the api key. e.g. default

Responses
200

Generated api key

application/json
post
/api/v1/auth/key
POST /api/v1/auth/key HTTP/1.1
Host: api.bricks-dev.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "name": "text"
}
{
  "api_key": "bbx_<random_secret>"
}
get

Get list api key details

🔒 Requires the read:organization_api_key permission

Authorizations
Query parameters
offsetnumberOptional

Results offset to allow pagination e.g. 10

Default: 0Example: 10
limitnumberOptional

Results limit to allow pagination, e.g. 50

Default: 20Example: 10
orderstringOptional

Specifies the order - ascending or descending - by which the returned list should be sorted e.g. ASC

sortstring · enumOptional

Specifies the attribute by which the returned list should be sorted. Can include the sort direction as ‘asc’ or ‘desc’. e.g. sort=name&order=asc

Default: created_atPossible values:
searchstringOptional

Enables searching within the list for api keys names that match a particular query. coming soon

Responses
200

List of api keys details

application/json
get
/api/v1/auth/keys
GET /api/v1/auth/keys HTTP/1.1
Host: api.bricks-dev.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "total": 1,
  "list": [
    {
      "id": "25cd0bd6-d09b-4924-abfb-41768d111fe7",
      "name": "default",
      "created_at": "2025-11-11T11:03:42.919Z",
      "expiration_time": null,
      "updated_at": null,
      "created_by": {
        "id": "prov0|1234567890",
        "name": "John Doe",
        "nickname": "JD",
        "picture": "https://example.com/profile.jpg"
      },
      "is_disabled": false
    }
  ]
}
post

Activate api key

🔒 Requires the update:organization_api_key permission

Authorizations
Body
namestringRequired

Name of the api key. e.g. default

Responses
200

Activated api key

application/json
post
/api/v1/auth/key/activate
POST /api/v1/auth/key/activate HTTP/1.1
Host: api.bricks-dev.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "name": "text"
}
{
  "name": "default",
  "is_active": true
}
post

Deactivate api key

🔒 Requires the update:organization_api_key permission

Authorizations
Body
namestringRequired

Name of the api key. e.g. default

Responses
200

Deactivated api key

application/json
post
/api/v1/auth/key/deactivate
POST /api/v1/auth/key/deactivate HTTP/1.1
Host: api.bricks-dev.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "name": "text"
}
{
  "name": "default",
  "is_active": true
}

Last updated

Was this helpful?