Skip to content

Create

POST/users

Creates a user.

Body ParametersJSONExpand Collapse
external_id: string

User-provided unique ID.

tags: optional array of object { key, value }

Tags for the user.

key: string

Tag key. Must not contain #, /, or :. Max 50 characters.

value: string

Tag value. Must not contain #, /, or :. Max 200 characters.

ReturnsExpand Collapse
data: User { id, external_id, tags }

User object.

id: string

FRAGMENT generated unique ID.

external_id: string

User-provided unique ID.

tags: array of object { key, value }

Tags for the user.

key: string

Tag key.

value: string

Tag value.

Create

curl https://api.us-west-2.fragment.dev/billing/users \
    -H 'Content-Type: application/json' \
    -d '{
          "external_id": "user_ext_123"
        }'
{
  "data": {
    "id": "user_abc123",
    "external_id": "user_ext_123",
    "tags": [
      {
        "key": "department",
        "value": "engineering"
      }
    ]
  }
}
Returns Examples
{
  "data": {
    "id": "user_abc123",
    "external_id": "user_ext_123",
    "tags": [
      {
        "key": "department",
        "value": "engineering"
      }
    ]
  }
}