Skip to main content
POST
/
v1
/
limits
Create a Limit
curl --request POST \
  --url https://tracer.lerian.io/v1/limits \
  --header 'Content-Type: <content-type>' \
  --header 'X-API-Key: <x-api-key>' \
  --data '
{
  "name": "Daily Corporate Limit",
  "description": "Daily spending limit for corporate segment",
  "limitType": "DAILY",
  "maxAmount": 5000000,
  "currency": "BRL",
  "scopes": [
    {
      "segmentId": "770e8400-e29b-41d4-a716-446655440002",
      "transactionType": "CARD"
    }
  ]
}
'
{
"limitId": "ff1e8400-e29b-41d4-a716-446655440050",
"name": "Daily Corporate Limit",
"description": "Daily spending limit for corporate segment",
"limitType": "DAILY",
"maxAmount": 5000000,
"currency": "BRL",
"scopes": [
{
"segmentId": "770e8400-e29b-41d4-a716-446655440002",
"transactionType": "CARD"
}
],
"status": "DRAFT",
"resetAt": "2026-01-31T00:00:00Z",
"createdAt": "2026-01-30T10:00:00Z",
"updatedAt": "2026-01-30T10:00:00Z"
}

Headers

Content-Type
string
required

The type of media of the resource. Must be application/json.

X-API-Key
string
required

The API Key for authentication. This header is required for all endpoints except health checks.

X-Request-Id
string<uuid>

A unique identifier used to trace and track each request.

Body

application/json

Input for creating a new spending limit.

name
string
required

Human-readable limit name.

Required string length: 1 - 255
limitType
enum<string>
required

Type of limit (cannot be changed after creation).

Available options:
DAILY,
MONTHLY,
PER_TRANSACTION
maxAmount
integer
required

Maximum amount in cents.

Required range: x >= 1
currency
string
required

ISO 4217 currency code (cannot be changed after creation).

Required string length: 3
scopes
object[]
required

At least one scope is required.

Required array length: 1 - 100 elements
description
string
Maximum string length: 1000

Response

Indicates that the limit was successfully created in DRAFT status.

Spending limit.

limitId
string<uuid>

Unique identifier for the limit.

name
string

Human-readable limit name.

Maximum string length: 255
description
string

Limit purpose and usage explanation.

Maximum string length: 1000
limitType
enum<string>

Type of limit (immutable after creation).

Available options:
DAILY,
MONTHLY,
PER_TRANSACTION
maxAmount
integer

Maximum amount in cents.

Required range: x >= 1
currency
string

ISO 4217 currency code (immutable after creation).

Required string length: 3
scopes
object[]

Scopes that determine which transactions this limit applies to.

status
enum<string>

Limit lifecycle status.

Available options:
DRAFT,
ACTIVE,
INACTIVE,
DELETED
resetAt
string<date-time> | null

When the limit counter resets (DAILY/MONTHLY only). Null for PER_TRANSACTION limits.

createdAt
string<date-time>

When the limit was created.

updatedAt
string<date-time>

When the limit was last modified.

deletedAt
string<date-time> | null

When the limit was deleted (null if not deleted).