Menu
GETPOST automation-secrets/ Service tier

GET / POST /api/internal/automation-secrets/

GET query params:
    integration_type (optional; repeatable or comma-separated for OR filter)
    credential_type (optional)
    include_pending_rotation (default true)
    include_suspended (default true; pass false for pickers / MCP)

POST body: {name, integration_type, value, is_private?}

URL

  • Service tierhttps://automations.mattering.io/api/internal/automation-secrets/

Query parameters

NameDefault
credential_typenone
include_pending_rotationtrue
include_suspendedtrue
workspace_idnone

Body keys (JSON)

KeyRequiredDefault
credential_typeoptional or conditionalnone
field_valuesoptional or conditionalnone
integration_typeoptional or conditionalcustom
is_privateoptional or conditionalfalse
nameoptional or conditionalnone
valueoptional or conditionalnone
workspace_idoptional or conditionalnone

Keys the view reads. A key not in this list is ignored by the view. Where a key is required only for some actions (for example the action dispatch), the description above says which.

Responses

200 bare JSON object (no envelope)

{
  "results": [
    {
      "id": "...",
      "workspace_id": "...",
      "name": "...",
      "integration_type": "...",
      "credential_type": "...",
      "fingerprint": "...",
      "current_version": "...",
      "status": "...",
      "is_private": true,
      "pending_rotation_reason": "...",
      "created_by_user_id": "...",
      "created_at": "2026-01-01T00:00:00Z",
      "updated_at": "2026-01-01T00:00:00Z",
      "last_used_at": "2026-01-01T00:00:00Z"
    }
  ],
  "count": 0
}

201 bare JSON object (no envelope)

{
  "id": "...",
  "workspace_id": "...",
  "name": "...",
  "integration_type": "...",
  "credential_type": "...",
  "fingerprint": "...",
  "current_version": "...",
  "status": "...",
  "is_private": true,
  "pending_rotation_reason": "...",
  "created_by_user_id": "...",
  "created_at": "2026-01-01T00:00:00Z",
  "updated_at": "2026-01-01T00:00:00Z",
  "last_used_at": "2026-01-01T00:00:00Z"
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
401unauthorized

Example

curl -X POST "https://automations.mattering.io/api/internal/automation-secrets/" \
  -H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
  -H "X-Internal-Org-Id: $ORG_ID" \
  -H "X-Internal-User-Email: you@example.com" \
  -H "Content-Type: application/json" \
  -d '{
  "credential_type": "...",
  "field_values": "...",
  "integration_type": "custom",
  "is_private": false,
  "name": "...",
  "value": "...",
  "workspace_id": "..."
}'

Source: AutomationsCore/automation_secrets/views.py (views.secret_list_or_create)

POST automation-secrets/bulk-rotate/ Service tier

POST /api/internal/automation-secrets/bulk-rotate/

Body: {"rotations": [{"secret_id": "<uuid>", "new_value": "<str>"}, ...]}

Returns the per-item result from secret_bulk_rotate.bulk_rotate_secrets. See that module's docstring for the response shape and error semantics. The HTTP status is:

* 200 if validation passed (regardless of how many individual rotations succeeded: caller inspects succeeded/failed). * 400 if the input shape is malformed (empty list, duplicates, bad entry shape). * 413 if the batch exceeds AUTOMATION_SECRETS_BULK_ROTATE_MAX_BATCH.

Authentication: standard X-Internal-Secret + X-Internal-User-Id + X-Internal-Org-Id headers; each rotation enforces assert_can_manage independently against the actor.

URL

  • Service tierhttps://automations.mattering.io/api/internal/automation-secrets/bulk-rotate/

Body keys (JSON)

KeyRequiredDefault
rotationsoptional or conditionalnone

Keys the view reads. A key not in this list is ignored by the view. Where a key is required only for some actions (for example the action dispatch), the description above says which.

Responses

200 bare JSON object (no envelope)

...

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
401unauthorized

Example

curl -X POST "https://automations.mattering.io/api/internal/automation-secrets/bulk-rotate/" \
  -H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
  -H "X-Internal-Org-Id: $ORG_ID" \
  -H "X-Internal-User-Email: you@example.com" \
  -H "Content-Type: application/json" \
  -d '{
  "rotations": "..."
}'

Source: AutomationsCore/automation_secrets/views.py (views.bulk_rotate)

GET automation-secrets/credential-types/ Service tier

GET /api/internal/automation-secrets/credential-types/

Returns the n8n-style credential type registry as a JSON list. The canvas + secrets management UI fetch this once on load to render the type picker (categorized by predefined / generic / legacy) and the per-type create form.

Auth: standard X-Internal-Secret (caller has been through the InternalAPIGuard) but no per-user / per-org scoping: the registry is the same for every actor. Returning it here (rather than inlining in templates) means the canvas frontend in BOTH mattering_platform and mattering_productivity gets the same type list with no template duplication.

URL

  • Service tierhttps://automations.mattering.io/api/internal/automation-secrets/credential-types/

Responses

200 bare JSON object (no envelope)

{
  "results": "...",
  "count": 0
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Example

curl -X GET "https://automations.mattering.io/api/internal/automation-secrets/credential-types/" \
  -H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
  -H "X-Internal-Org-Id: $ORG_ID" \
  -H "X-Internal-User-Email: you@example.com"

Source: AutomationsCore/automation_secrets/views.py (views.credential_types_list)

POST automation-secrets/dispatch-redeem/ Service tier

POST /api/internal/automation-secrets/dispatch-redeem/

Body: {token: str, worker_id: str}

Returns the secret value as base64-encoded bytes (binary-safe). Workers decode and hold in memory for the duration of the job.

The actor headers (X-Internal-User-Id / X-Internal-Org-Id) are NOT used for ACL here: the JWT itself carries the authorized user + org. The headers may still be present for audit-trail purposes (the platform proxy / scheduler context calling on behalf of a worker), but ACL bypass is structurally impossible because the redeem call uses the per-org SA tied to the secret's actual org, not the actor's org.

URL

  • Service tierhttps://automations.mattering.io/api/internal/automation-secrets/dispatch-redeem/

Body keys (JSON)

KeyRequiredDefault
tokenoptional or conditionalnone
worker_idoptional or conditionalnone

Keys the view reads. A key not in this list is ignored by the view. Where a key is required only for some actions (for example the action dispatch), the description above says which.

Responses

200 bare JSON object (no envelope)

{
  "value_base64": "...",
  "byte_length": 0
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Example

curl -X POST "https://automations.mattering.io/api/internal/automation-secrets/dispatch-redeem/" \
  -H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
  -H "X-Internal-Org-Id: $ORG_ID" \
  -H "X-Internal-User-Email: you@example.com" \
  -H "Content-Type: application/json" \
  -d '{
  "token": "...",
  "worker_id": "..."
}'

Source: AutomationsCore/automation_secrets/views.py (views.dispatch_token_redeem)

POST automation-secrets/login-grant-redeem/ Service tier

POST /api/internal/automation-secrets/login-grant-redeem/

Body: {token, session, runtime_id}. Header X-Browser-Runtime-Secret.

Returns {fields: {username, password}, origin, secret_id}: the values, once, to the browser runtime that will type them into that origin.

URL

  • Service tierhttps://automations.mattering.io/api/internal/automation-secrets/login-grant-redeem/

Body keys (JSON)

KeyRequiredDefault
runtime_idoptional or conditionalnone
sessionoptional or conditionalnone
tokenoptional or conditionalnone

Keys the view reads. A key not in this list is ignored by the view. Where a key is required only for some actions (for example the action dispatch), the description above says which.

Responses

200 bare JSON object (no envelope)

...

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
403forbidden

Example

curl -X POST "https://automations.mattering.io/api/internal/automation-secrets/login-grant-redeem/" \
  -H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
  -H "X-Internal-Org-Id: $ORG_ID" \
  -H "X-Internal-User-Email: you@example.com" \
  -H "Content-Type: application/json" \
  -d '{
  "runtime_id": "...",
  "session": "...",
  "token": "..."
}'

Source: AutomationsCore/automation_secrets/views.py (views.login_grant_redeem)

POST automation-secrets/offboard-user/ Service tier

POST /api/internal/automation-secrets/offboard-user/

Body: {user_id: int, scope_org_id?: uuid-str, reason?: str}

Triggered by the platform proxy on user-removed-from-org events (or full account deletion). Idempotent. Does NOT use the X-Internal-User-Id actor header: the InternalAPIGuard shared secret is the entire authority for this endpoint.

Returns the offboarding service's summary unchanged so the caller can log/display destroyed/pending counts.

URL

  • Service tierhttps://automations.mattering.io/api/internal/automation-secrets/offboard-user/

Body keys (JSON)

KeyRequiredDefault
reasonoptional or conditionalnone
scope_org_idoptional or conditionalnone
user_idoptional or conditionalnone

Keys the view reads. A key not in this list is ignored by the view. Where a key is required only for some actions (for example the action dispatch), the description above says which.

Responses

200 bare JSON object (no envelope)

...

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Example

curl -X POST "https://automations.mattering.io/api/internal/automation-secrets/offboard-user/" \
  -H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
  -H "X-Internal-Org-Id: $ORG_ID" \
  -H "X-Internal-User-Email: you@example.com" \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "...",
  "scope_org_id": "...",
  "user_id": "..."
}'

Source: AutomationsCore/automation_secrets/views.py (views.offboard_user)

GET automation-secrets/pending-rotation/ Service tier

GET /api/internal/automation-secrets/pending-rotation/

A focused list of just the pending_rotation secrets the actor can see, used to populate the bulk-rotation UI. Equivalent to calling the generic list endpoint with a status filter; provided as a dedicated endpoint so the UI doesn't have to know the multi-status filtering convention.

Query params:
    integration_type (optional): limit to one integration.
Response shape:
    {
        "results": [<serialized secret>, ...],
        "count": N,
    }

Each entry includes the same metadata as the regular list endpoint: never the value, never the GSM ID.

URL

  • Service tierhttps://automations.mattering.io/api/internal/automation-secrets/pending-rotation/

Query parameters

NameDefault
integration_typenone

Responses

200 bare JSON object (no envelope)

{
  "results": [
    {
      "id": "...",
      "workspace_id": "...",
      "name": "...",
      "integration_type": "...",
      "credential_type": "...",
      "fingerprint": "...",
      "current_version": "...",
      "status": "...",
      "is_private": true,
      "pending_rotation_reason": "...",
      "created_by_user_id": "...",
      "created_at": "2026-01-01T00:00:00Z",
      "updated_at": "2026-01-01T00:00:00Z",
      "last_used_at": "2026-01-01T00:00:00Z"
    }
  ],
  "count": 0
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
401unauthorized

Example

curl -X GET "https://automations.mattering.io/api/internal/automation-secrets/pending-rotation/?integration_type=..." \
  -H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
  -H "X-Internal-Org-Id: $ORG_ID" \
  -H "X-Internal-User-Email: you@example.com"

Source: AutomationsCore/automation_secrets/views.py (views.secrets_pending_rotation)

POST automation-secrets/suspend-user/ Service tier

POST /api/internal/automation-secrets/suspend-user/

Body: {user_id: int, scope_org_id?: uuid-str, reason?: str}

Reversible. Flips ACTIVE secrets owned by user_id to SUSPENDED. Use when the user's account is in a transient security review state (password reset, suspected credential compromise): the automations stop running but the values are preserved for an unsuspend-user/ call once the security event resolves.

URL

  • Service tierhttps://automations.mattering.io/api/internal/automation-secrets/suspend-user/

Body keys (JSON)

KeyRequiredDefault
reasonoptional or conditionalnone
scope_org_idoptional or conditionalnone
user_idoptional or conditionalnone

Keys the view reads. A key not in this list is ignored by the view. Where a key is required only for some actions (for example the action dispatch), the description above says which.

Responses

200 bare JSON object (no envelope)

...

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Example

curl -X POST "https://automations.mattering.io/api/internal/automation-secrets/suspend-user/" \
  -H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
  -H "X-Internal-Org-Id: $ORG_ID" \
  -H "X-Internal-User-Email: you@example.com" \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "...",
  "scope_org_id": "...",
  "user_id": "..."
}'

Source: AutomationsCore/automation_secrets/views.py (views.suspend_user)

POST automation-secrets/unsuspend-user/ Service tier

POST /api/internal/automation-secrets/unsuspend-user/

Body: {user_id: int, scope_org_id?: uuid-str}

Reverses suspend-user/. Only flips SUSPENDED rows whose pending_rotation_reason is the SUSPENSION_REASON_PREFIX-tagged one written by the suspend service: pending_rotation rows are NOT touched (those are offboarding-triggered and require real rotation).

URL

  • Service tierhttps://automations.mattering.io/api/internal/automation-secrets/unsuspend-user/

Body keys (JSON)

KeyRequiredDefault
reasonoptional or conditionalnone
scope_org_idoptional or conditionalnone
user_idoptional or conditionalnone

Keys the view reads. A key not in this list is ignored by the view. Where a key is required only for some actions (for example the action dispatch), the description above says which.

Responses

200 bare JSON object (no envelope)

...

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Example

curl -X POST "https://automations.mattering.io/api/internal/automation-secrets/unsuspend-user/" \
  -H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
  -H "X-Internal-Org-Id: $ORG_ID" \
  -H "X-Internal-User-Email: you@example.com" \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "...",
  "scope_org_id": "...",
  "user_id": "..."
}'

Source: AutomationsCore/automation_secrets/views.py (views.unsuspend_user)

GETDELETE automation-secrets/{secret_id}/ Service tier

GET / DELETE /api/internal/automation-secrets/<secret_id>/

GET returns metadata. DELETE destroys terminally.

URL

  • Service tierhttps://automations.mattering.io/api/internal/automation-secrets/{secret_id}/

Path parameters

NameType
secret_iduuid

Responses

200 bare JSON object (no envelope)

{
  "id": "...",
  "workspace_id": "...",
  "name": "...",
  "integration_type": "...",
  "credential_type": "...",
  "fingerprint": "...",
  "current_version": "...",
  "status": "...",
  "is_private": true,
  "pending_rotation_reason": "...",
  "created_by_user_id": "...",
  "created_at": "2026-01-01T00:00:00Z",
  "updated_at": "2026-01-01T00:00:00Z",
  "last_used_at": "2026-01-01T00:00:00Z"
}

204 non-JSON body

binary or text body

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
401unauthorized

Example

curl -X GET "https://automations.mattering.io/api/internal/automation-secrets/SECRET_ID/" \
  -H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
  -H "X-Internal-Org-Id: $ORG_ID" \
  -H "X-Internal-User-Email: you@example.com"

Source: AutomationsCore/automation_secrets/views.py (views.secret_detail)

POST automation-secrets/{secret_id}/dispatch-tokens/ Service tier

POST /api/internal/automation-secrets/<id>/dispatch-tokens/

Body: {automation_execution_id?, purpose?, ttl_seconds?, pin_version?}

Returns the JWT and metadata. Workers receive the token via job spec / queue payload: they don't call this endpoint themselves.

URL

  • Service tierhttps://automations.mattering.io/api/internal/automation-secrets/{secret_id}/dispatch-tokens/

Path parameters

NameType
secret_iduuid

Body keys (JSON)

KeyRequiredDefault
automation_execution_idoptional or conditionalnone
pin_versionoptional or conditionalnone
purposeoptional or conditionalnone
ttl_secondsoptional or conditionalnone

Keys the view reads. A key not in this list is ignored by the view. Where a key is required only for some actions (for example the action dispatch), the description above says which.

Responses

201 bare JSON object (no envelope)

{
  "token": "...",
  "secret_id": "...",
  "gsm_version": "...",
  "purpose": "...",
  "expires_at": "...",
  "issued_at": "..."
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
401unauthorized

Example

curl -X POST "https://automations.mattering.io/api/internal/automation-secrets/SECRET_ID/dispatch-tokens/" \
  -H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
  -H "X-Internal-Org-Id: $ORG_ID" \
  -H "X-Internal-User-Email: you@example.com" \
  -H "Content-Type: application/json" \
  -d '{
  "automation_execution_id": "...",
  "pin_version": "...",
  "purpose": "...",
  "ttl_seconds": "..."
}'

Source: AutomationsCore/automation_secrets/views.py (views.dispatch_token_mint)

GET automation-secrets/{secret_id}/grants/ Service tier

GET /api/internal/automation-secrets/<id>/grants/

URL

  • Service tierhttps://automations.mattering.io/api/internal/automation-secrets/{secret_id}/grants/

Path parameters

NameType
secret_iduuid

Responses

200 bare JSON object (no envelope)

{
  "results": [
    {
      "id": "...",
      "secret_id": "...",
      "grant_type": "...",
      "user_id": "...",
      "user_email": "...",
      "role": "...",
      "granted_by_user_id": "...",
      "granted_at": "2026-01-01T00:00:00Z"
    }
  ],
  "count": 0
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
401unauthorized

Example

curl -X GET "https://automations.mattering.io/api/internal/automation-secrets/SECRET_ID/grants/" \
  -H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
  -H "X-Internal-Org-Id: $ORG_ID" \
  -H "X-Internal-User-Email: you@example.com"

Source: AutomationsCore/automation_secrets/views.py (views.grants_list)

POSTDELETE automation-secrets/{secret_id}/grants/org-wide/ Service tier

POST / DELETE /api/internal/automation-secrets/<id>/grants/org-wide/

POST body: {role: "use"|"manage"} DELETE query: ?role=use|manage

URL

  • Service tierhttps://automations.mattering.io/api/internal/automation-secrets/{secret_id}/grants/org-wide/

Path parameters

NameType
secret_iduuid

Query parameters

NameDefault
roleuse

Body keys (JSON)

KeyRequiredDefault
roleoptional or conditionaluse

Keys the view reads. A key not in this list is ignored by the view. Where a key is required only for some actions (for example the action dispatch), the description above says which.

Responses

200 bare JSON object (no envelope)

{
  "deleted": true
}

201 bare JSON object (no envelope)

{
  "id": "...",
  "secret_id": "...",
  "grant_type": "...",
  "user_id": "...",
  "user_email": "...",
  "role": "...",
  "granted_by_user_id": "...",
  "granted_at": "2026-01-01T00:00:00Z"
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
401unauthorized

Example

curl -X POST "https://automations.mattering.io/api/internal/automation-secrets/SECRET_ID/grants/org-wide/" \
  -H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
  -H "X-Internal-Org-Id: $ORG_ID" \
  -H "X-Internal-User-Email: you@example.com" \
  -H "Content-Type: application/json" \
  -d '{
  "role": "use"
}'

Source: AutomationsCore/automation_secrets/views.py (views.grants_org_wide)

POST automation-secrets/{secret_id}/grants/users/ Service tier

POST /api/internal/automation-secrets/<id>/grants/users/

Body: {target_user_id: int, role: "use"|"manage"}

Trust boundary: the platform proxy MUST verify target_user_id is in actor_org_id's org before forwarding. As a defense-in-depth check we also call mattering_auth's membership endpoint via org_membership.is_user_in_org.

Three buckets, three responses:

* Auth says member (True) returns 201 (grant created).
* Auth says not-a-member (False) returns 400 SecretValidationError. The
  platform proxy is wrong / a direct internal-API caller is trying
  to grant cross-org. Either way the grant is unsafe; refuse.
* Auth says indeterminate (None) returns outcome depends on the
  AUTOMATION_SECRETS_ORG_MEMBERSHIP_POLICY deployment setting:
    - allow_on_indeterminate (default): proceed; trust the
      platform proxy. Preserves availability when auth is briefly
      unreachable.
    - refuse_on_indeterminate: refuse with 503 so the caller
      retries. Recommended once the auth membership endpoint is
      deployed and SLA-stable.

URL

  • Service tierhttps://automations.mattering.io/api/internal/automation-secrets/{secret_id}/grants/users/

Path parameters

NameType
secret_iduuid

Body keys (JSON)

KeyRequiredDefault
roleoptional or conditionaluse
target_user_emailoptional or conditionalnone
target_user_idoptional or conditionalnone

Keys the view reads. A key not in this list is ignored by the view. Where a key is required only for some actions (for example the action dispatch), the description above says which.

Responses

201 bare JSON object (no envelope)

{
  "id": "...",
  "secret_id": "...",
  "grant_type": "...",
  "user_id": "...",
  "user_email": "...",
  "role": "...",
  "granted_by_user_id": "...",
  "granted_at": "2026-01-01T00:00:00Z"
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
401unauthorized
503OrgMembershipUnavailable message

Example

curl -X POST "https://automations.mattering.io/api/internal/automation-secrets/SECRET_ID/grants/users/" \
  -H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
  -H "X-Internal-Org-Id: $ORG_ID" \
  -H "X-Internal-User-Email: you@example.com" \
  -H "Content-Type: application/json" \
  -d '{
  "role": "use",
  "target_user_email": "...",
  "target_user_id": "..."
}'

Source: AutomationsCore/automation_secrets/views.py (views.grants_user_create)

DELETE automation-secrets/{secret_id}/grants/users/{target_user_id}/ Service tier

DELETE /api/internal/automation-secrets/<id>/grants/users/<uid>/?role=use|manage

URL

  • Service tierhttps://automations.mattering.io/api/internal/automation-secrets/{secret_id}/grants/users/{target_user_id}/

Path parameters

NameType
secret_iduuid
target_user_idint

Query parameters

NameDefault
roleuse

Responses

200 bare JSON object (no envelope)

{
  "deleted": true
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
401unauthorized

Example

curl -X DELETE "https://automations.mattering.io/api/internal/automation-secrets/SECRET_ID/grants/users/TARGET_USER_ID/" \
  -H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
  -H "X-Internal-Org-Id: $ORG_ID" \
  -H "X-Internal-User-Email: you@example.com"

Source: AutomationsCore/automation_secrets/views.py (views.grants_user_delete)

POST automation-secrets/{secret_id}/login-grants/ Service tier

POST /api/internal/automation-secrets/<id>/login-grants/

Body: {origin, session, ttl_seconds?}

Called by the Agents app for the person an agent runs as. Returns an opaque grant for the browser runtime; never the value.

URL

  • Service tierhttps://automations.mattering.io/api/internal/automation-secrets/{secret_id}/login-grants/

Path parameters

NameType
secret_iduuid

Body keys (JSON)

KeyRequiredDefault
originoptional or conditionalnone
sessionoptional or conditionalnone
ttl_secondsoptional or conditionalnone

Keys the view reads. A key not in this list is ignored by the view. Where a key is required only for some actions (for example the action dispatch), the description above says which.

Responses

201 bare JSON object (no envelope)

...

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
401unauthorized

Example

curl -X POST "https://automations.mattering.io/api/internal/automation-secrets/SECRET_ID/login-grants/" \
  -H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
  -H "X-Internal-Org-Id: $ORG_ID" \
  -H "X-Internal-User-Email: you@example.com" \
  -H "Content-Type: application/json" \
  -d '{
  "origin": "...",
  "session": "...",
  "ttl_seconds": "..."
}'

Source: AutomationsCore/automation_secrets/views.py (views.login_grant_mint)

POST automation-secrets/{secret_id}/rotate/ Service tier

POST /api/internal/automation-secrets/<id>/rotate/

Body: {value}

URL

  • Service tierhttps://automations.mattering.io/api/internal/automation-secrets/{secret_id}/rotate/

Path parameters

NameType
secret_iduuid

Body keys (JSON)

KeyRequiredDefault
field_valuesoptional or conditionalnone
valueoptional or conditionalnone

Keys the view reads. A key not in this list is ignored by the view. Where a key is required only for some actions (for example the action dispatch), the description above says which.

Responses

200 bare JSON object (no envelope)

{
  "id": "...",
  "workspace_id": "...",
  "name": "...",
  "integration_type": "...",
  "credential_type": "...",
  "fingerprint": "...",
  "current_version": "...",
  "status": "...",
  "is_private": true,
  "pending_rotation_reason": "...",
  "created_by_user_id": "...",
  "created_at": "2026-01-01T00:00:00Z",
  "updated_at": "2026-01-01T00:00:00Z",
  "last_used_at": "2026-01-01T00:00:00Z"
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
401unauthorized

Example

curl -X POST "https://automations.mattering.io/api/internal/automation-secrets/SECRET_ID/rotate/" \
  -H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
  -H "X-Internal-Org-Id: $ORG_ID" \
  -H "X-Internal-User-Email: you@example.com" \
  -H "Content-Type: application/json" \
  -d '{
  "field_values": "...",
  "value": "..."
}'

Source: AutomationsCore/automation_secrets/views.py (views.secret_rotate)

POST automation-secrets/{secret_id}/share/ Service tier

POST /api/internal/automation-secrets/<id>/share/: flip is_private to False.

URL

  • Service tierhttps://automations.mattering.io/api/internal/automation-secrets/{secret_id}/share/

Path parameters

NameType
secret_iduuid

Responses

200 bare JSON object (no envelope)

{
  "id": "...",
  "workspace_id": "...",
  "name": "...",
  "integration_type": "...",
  "credential_type": "...",
  "fingerprint": "...",
  "current_version": "...",
  "status": "...",
  "is_private": true,
  "pending_rotation_reason": "...",
  "created_by_user_id": "...",
  "created_at": "2026-01-01T00:00:00Z",
  "updated_at": "2026-01-01T00:00:00Z",
  "last_used_at": "2026-01-01T00:00:00Z"
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
401unauthorized

Example

curl -X POST "https://automations.mattering.io/api/internal/automation-secrets/SECRET_ID/share/" \
  -H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
  -H "X-Internal-Org-Id: $ORG_ID" \
  -H "X-Internal-User-Email: you@example.com"

Source: AutomationsCore/automation_secrets/views.py (views.secret_share)

POST automation-secrets/{secret_id}/unshare/ Service tier

POST /api/internal/automation-secrets/<id>/unshare/: flip is_private to True.

Reverts an org-shareable secret to private and strips every non-creator grant (org-wide + other users), keeping the creator's own access. See secret_grants.unshare_secret for the security caveat (re-privatizing does not unsee an already-read value).

URL

  • Service tierhttps://automations.mattering.io/api/internal/automation-secrets/{secret_id}/unshare/

Path parameters

NameType
secret_iduuid

Responses

200 bare JSON object (no envelope)

{
  "id": "...",
  "workspace_id": "...",
  "name": "...",
  "integration_type": "...",
  "credential_type": "...",
  "fingerprint": "...",
  "current_version": "...",
  "status": "...",
  "is_private": true,
  "pending_rotation_reason": "...",
  "created_by_user_id": "...",
  "created_at": "2026-01-01T00:00:00Z",
  "updated_at": "2026-01-01T00:00:00Z",
  "last_used_at": "2026-01-01T00:00:00Z"
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
401unauthorized

Example

curl -X POST "https://automations.mattering.io/api/internal/automation-secrets/SECRET_ID/unshare/" \
  -H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
  -H "X-Internal-Org-Id: $ORG_ID" \
  -H "X-Internal-User-Email: you@example.com"

Source: AutomationsCore/automation_secrets/views.py (views.secret_unshare)

All Automations resources
Start Free Explore our Products