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
| Name | Default |
credential_type | none |
include_pending_rotation | true |
include_suspended | true |
workspace_id | none |
Body keys (JSON)
| Key | Required | Default |
credential_type | optional or conditional | none |
field_values | optional or conditional | none |
integration_type | optional or conditional | custom |
is_private | optional or conditional | false |
name | optional or conditional | none |
value | optional or conditional | none |
workspace_id | optional or conditional | none |
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
| Status | Code |
| 401 | unauthorized |
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)
| Key | Required | Default |
rotations | optional or conditional | none |
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
| Status | Code |
| 401 | unauthorized |
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)
| Key | Required | Default |
token | optional or conditional | none |
worker_id | optional or conditional | none |
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)
| Key | Required | Default |
runtime_id | optional or conditional | none |
session | optional or conditional | none |
token | optional or conditional | none |
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
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)
| Key | Required | Default |
reason | optional or conditional | none |
scope_org_id | optional or conditional | none |
user_id | optional or conditional | none |
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
| Name | Default |
integration_type | none |
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
| Status | Code |
| 401 | unauthorized |
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)
| Key | Required | Default |
reason | optional or conditional | none |
scope_org_id | optional or conditional | none |
user_id | optional or conditional | none |
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)
| Key | Required | Default |
reason | optional or conditional | none |
scope_org_id | optional or conditional | none |
user_id | optional or conditional | none |
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
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
| Status | Code |
| 401 | unauthorized |
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
Body keys (JSON)
| Key | Required | Default |
automation_execution_id | optional or conditional | none |
pin_version | optional or conditional | none |
purpose | optional or conditional | none |
ttl_seconds | optional or conditional | none |
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
| Status | Code |
| 401 | unauthorized |
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
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
| Status | Code |
| 401 | unauthorized |
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
Query parameters
Body keys (JSON)
| Key | Required | Default |
role | optional or conditional | use |
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
| Status | Code |
| 401 | unauthorized |
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
Body keys (JSON)
| Key | Required | Default |
role | optional or conditional | use |
target_user_email | optional or conditional | none |
target_user_id | optional or conditional | none |
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
| Status | Code |
| 401 | unauthorized |
| 503 | OrgMembershipUnavailable 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
| Name | Type |
secret_id | uuid |
target_user_id | int |
Query parameters
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
| Status | Code |
| 401 | unauthorized |
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
Body keys (JSON)
| Key | Required | Default |
origin | optional or conditional | none |
session | optional or conditional | none |
ttl_seconds | optional or conditional | none |
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
| Status | Code |
| 401 | unauthorized |
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/
URL
- Service tierhttps://automations.mattering.io/api/internal/automation-secrets/{secret_id}/rotate/
Path parameters
Body keys (JSON)
| Key | Required | Default |
field_values | optional or conditional | none |
value | optional or conditional | none |
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
| Status | Code |
| 401 | unauthorized |
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
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
| Status | Code |
| 401 | unauthorized |
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
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
| Status | Code |
| 401 | unauthorized |
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)