SettingsCreate a barrier type

Create a barrier type

Adds a reason that can be attached to sales opportunities. Do not retry blindly — check the Reporting API's barrier list.

Use it to:

  • Seed the CRM barrier list of a new account

Behaviour:

  • Not idempotent.
  • Not safe to retry blindly. A 500 may follow a committed insert. Retrying with the SAME Id fails on the unique GUID (no duplicate); with a new Id it creates a duplicate.
  • Duplicates: Names are not deduplicated; the caller-supplied Id is unique.
  • Changes are visible to the next read immediately.

Next: PUT /v1/barrier

curl -X POST "https://app3.timelog.com/your-account/api/v1/barrier" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "Id": "123e4567-e89b-12d3-a456-426614174000",
  "Name": "John Doe"
}'
{
  "Properties": {
    "BarrierID": 123,
    "Id": "123e4567-e89b-12d3-a456-426614174000",
    "Name": "John Doe"
  },
  "Links": [
    {
      "Href": "example_string",
      "Rel": "example_string"
    }
  ],
  "Actions": [
    {}
  ]
}
POST
/v1/barrier
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. JWT and reference tokens are both accepted. The token must carry the required scope (default tlp). The token's sub claim is the acting user. A token WITHOUT sub (client-credentials) acts as the system service user. If the sub user cannot log in (inactive, locked, deleted), the request is rejected with 401 — it is no longer let through without a user. > Not yet documented: how to obtain a token. > Not yet documented: token lifetime.

OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. JWT and reference tokens are both accepted. The token must carry the required scope (default tlp). The token's sub claim is the acting user. A token WITHOUT sub (client-credentials) acts as the system service user. If the sub user cannot log in (inactive, locked, deleted), the request is rejected with 401 — it is no longer let through without a user. > Not yet documented: how to obtain a token. > Not yet documented: token lifetime.
Content-Typestring
Required

The media type of the request body

Options: application/json
Idstring

GUID for the new barrier, generated by the caller. It becomes the barrier's Id (used by update and delete). Can be set on create only. Alternate key, unique per TimeLog site. Default: 00000000-0000-0000-0000-000000000000 - Omitted — The all-zero GUID is stored as the barrier's Id. - A GUID already used by another barrier (including a second all-zero one) — Unique constraint violation → 500 Code 100.

Format: uuid
Namestring

Display name of the barrier. Can be set on create only. - Missing, null or empty — 400 Code 200 "'Name' must not be empty." (captured). > Not yet documented: behaviour.

Min length: 1 • Max length: 255
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. JWT and reference tokens are both accepted. The token must carry the required scope (default tlp).

The token's sub claim is the acting user. A token WITHOUT sub (client-credentials) acts as the system service user. If the sub user cannot log in (inactive, locked, deleted), the request is rejected with 401 — it is no longer let through without a user.

Not yet documented: how to obtain a token.

Not yet documented: token lifetime.

Body

application/json
Idstring

GUID for the new barrier, generated by the caller. It becomes the barrier's Id (used by update and delete).

Can be set on create only.

Alternate key, unique per TimeLog site.

Default: 00000000-0000-0000-0000-000000000000

  • Omitted — The all-zero GUID is stored as the barrier's Id.

  • A GUID already used by another barrier (including a second all-zero one) — Unique constraint violation → 500 Code 100.

Namestring

Display name of the barrier.

Can be set on create only.

  • Missing, null or empty — 400 Code 200 "'Name' must not be empty." (captured).

Not yet documented: behaviour.

Responses

Propertiesobject

A CRM barrier type: an entry of the account-wide list of reasons that hold back a sales opportunity (system administration page "Barrier management in TimeLog CRM"). Opportunities reference barriers by BarrierID. A barrier is NOT a time-registration or period lock: it is stored only on opportunities and used as a filter of the Reporting API's opportunity export. It blocks nothing. The active flag that exists in storage is not part of this model.

Linksarray
Actionsobject[]