> ## Documentation Index
> Fetch the complete documentation index at: https://hs-df36fa00.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Approve or Reject Pending Agent Submissions — Admin

> Approve or reject pending agent submissions using the admin review endpoints. Returns the updated AgentSubmissionRecord on success.

These endpoints let administrators manually approve or reject agent submissions that are awaiting review. When the node is configured to require manual approval, submitted agents remain in the `in_review` state until approved or rejected here. By default, submissions that pass all validation checks are auto-approved.

***

## Approve a submission

```
POST /v1/admin/agent-submissions/:submission_id/approve
```

Marks the submission as approved, publishes the agent to the registry, and returns the updated `AgentSubmissionRecord`.

### Path Parameters

<ParamField path="submission_id" type="string (UUID)" required>
  The UUID of the agent submission to approve.
</ParamField>

### Request Body

<ParamField body="reviewed_by" type="string" required>
  Identifier of the administrator approving the submission.
</ParamField>

<ParamField body="review_notes" type="string">
  Optional notes from the reviewer to attach to the submission record.
</ParamField>

### Example

```bash theme={null}
curl -X POST http://your-node:8042/v1/admin/agent-submissions/018f4e2a-aaaa-7d90-a1b2-3c4d5e6f7890/approve \
  -H 'content-type: application/json' \
  -d '{"reviewed_by": "admin", "review_notes": "looks good"}'
```

***

## Reject a submission

```
POST /v1/admin/agent-submissions/:submission_id/reject
```

Marks the submission as rejected and returns the updated `AgentSubmissionRecord`.

### Path Parameters

<ParamField path="submission_id" type="string (UUID)" required>
  The UUID of the agent submission to reject.
</ParamField>

### Request Body

<ParamField body="reviewed_by" type="string" required>
  Identifier of the administrator rejecting the submission.
</ParamField>

<ParamField body="reason" type="string" required>
  Mandatory explanation for the rejection, surfaced to the submitting provider.
</ParamField>

### Example

```bash theme={null}
curl -X POST http://your-node:8042/v1/admin/agent-submissions/018f4e2a-aaaa-7d90-a1b2-3c4d5e6f7890/reject \
  -H 'content-type: application/json' \
  -d '{"reviewed_by": "admin", "reason": "agent card missing required skill definitions"}'
```

***

## Response

Both endpoints return an `AgentSubmissionRecord`.

<ResponseField name="submission_id" type="string (UUID)" required>
  Unique identifier for this submission.
</ResponseField>

<ResponseField name="provider_id" type="string" required>
  The provider that submitted this agent.
</ResponseField>

<ResponseField name="agent_id" type="string" required>
  The agent identifier from the submission.
</ResponseField>

<ResponseField name="version" type="string" required>
  The version string from the submission.
</ResponseField>

<ResponseField name="status" type="string" required>
  Updated submission status. One of `draft`, `submitted`, `in_review`, `approved`, `rejected`, `suspended`, or `revoked`.
</ResponseField>

<ResponseField name="reviewed_by" type="string">
  Identifier of the reviewer, set after the approve or reject action.
</ResponseField>

<ResponseField name="review_notes" type="string">
  Notes from the reviewer. Present when notes were provided at approval.
</ResponseField>

<ResponseField name="rejection_reason" type="string">
  Reason for rejection. Present when the submission was rejected.
</ResponseField>

<ResponseField name="submitted_at" type="string (ISO 8601)" required>
  UTC timestamp when the submission was originally created.
</ResponseField>

<ResponseField name="updated_at" type="string (ISO 8601)" required>
  UTC timestamp of the most recent update to this submission record.
</ResponseField>

## Errors

| Status | Description                                          |
| ------ | ---------------------------------------------------- |
| `404`  | No submission with the given `submission_id` exists. |

### Example response

```json theme={null}
{
  "submission_id": "018f4e2a-aaaa-7d90-a1b2-3c4d5e6f7890",
  "provider_id": "acme-labs",
  "agent_id": "stripe-agent",
  "version": "0.2.0",
  "status": "approved",
  "reviewed_by": "admin",
  "review_notes": "looks good",
  "submitted_at": "2025-01-15T09:00:00Z",
  "updated_at": "2025-01-15T10:00:00Z"
}
```
