# Run this domain's source classification now

`POST /v1/domain-auth/domains/{domain}/remeasure`

- Authentication: required (Bearer token)
- Required scope: `api.domain_auth.manage`

Enqueues one domain's source-classification pass instead of waiting for
the nightly run.

The readiness endpoint's `impact` is the figure the verdict turns on, and
it reports its own `completeness`. An agent that reads
`completeness: partial` and can do nothing about it until tomorrow gives
the customer worse advice than the dashboard does — this is the endpoint
that closes that gap.

**One run per domain per hour, and a spent window is a 200.** Being
early is not a client error: the answer is "the last pass was recent
enough", and the body says so with `queued: false`, an honest
`retry_after_seconds`, and the two figures a caller actually wants —
when the last pass ran and what it left unmeasured. `Retry-After` is set
on the response as well. The limit is a rule about a DOMAIN, not about a
caller: it is the same window and the same limiter the dashboard's
control uses, so the two surfaces cannot quote different waits.

The response describes the registry as it stood when the request
arrived. It is never a prediction of what the queued run will find.

This endpoint writes no DNS, changes no DMARC policy, and records no
decision about a source. It reruns a measurement over evidence already
received. Non-destructive, so a test-environment credential may call it.

## Path parameters

- `domain` (string, required) — The domain, by NAME (`acme.com`). A UUID is also accepted. Matched case-insensitively, and scoped to the calling org — a domain belonging to another org is a 404, never a 403.

## Example request

```bash
curl -X POST 'https://api.sendops.dev/v1/domain-auth/domains/string/remeasure' \
  -H "Authorization: Bearer $SENDOPS_API_KEY"
```

## Responses

### 200 — Whether a run was queued, and what the last one left behind.

Content type: `application/json`

```json
{
  "queued": true,
  "retry_after_seconds": 0,
  "last_measured_at": "string",
  "unmeasured_sources": 0,
  "unmeasured_max_messages": 0,
  "registry_sources": 0
}
```

### 401 — Missing, malformed, or unknown API key

Content type: `application/problem+json`

```json
{
  "type": "https://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "invalid_key",
  "request_id": "string",
  "retry_after": 0,
  "retention_days": 0,
  "scope": "string",
  "resource": "string",
  "errors": [
    {
      "field": "string",
      "reason": "string"
    }
  ],
  "attribute_id": "00000000-0000-0000-0000-000000000000",
  "content_hash": "string",
  "differs": [
    "string"
  ]
}
```

### 403 — Key lacks the required scope or plan limit violated

Content type: `application/problem+json`

```json
{
  "type": "https://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "invalid_key",
  "request_id": "string",
  "retry_after": 0,
  "retention_days": 0,
  "scope": "string",
  "resource": "string",
  "errors": [
    {
      "field": "string",
      "reason": "string"
    }
  ],
  "attribute_id": "00000000-0000-0000-0000-000000000000",
  "content_hash": "string",
  "differs": [
    "string"
  ]
}
```

### 404 — Resource not found

Content type: `application/problem+json`

```json
{
  "type": "https://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "invalid_key",
  "request_id": "string",
  "retry_after": 0,
  "retention_days": 0,
  "scope": "string",
  "resource": "string",
  "errors": [
    {
      "field": "string",
      "reason": "string"
    }
  ],
  "attribute_id": "00000000-0000-0000-0000-000000000000",
  "content_hash": "string",
  "differs": [
    "string"
  ]
}
```

### 429 — Per-org rate limit exceeded

Content type: `application/problem+json`

```json
{
  "type": "https://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "invalid_key",
  "request_id": "string",
  "retry_after": 0,
  "retention_days": 0,
  "scope": "string",
  "resource": "string",
  "errors": [
    {
      "field": "string",
      "reason": "string"
    }
  ],
  "attribute_id": "00000000-0000-0000-0000-000000000000",
  "content_hash": "string",
  "differs": [
    "string"
  ]
}
```

### 500 — Unexpected server-side failure. The `code` is `internal_error`. The
`request_id` field can be quoted to SendOps support to investigate.

Content type: `application/problem+json`

```json
{
  "type": "https://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "invalid_key",
  "request_id": "string",
  "retry_after": 0,
  "retention_days": 0,
  "scope": "string",
  "resource": "string",
  "errors": [
    {
      "field": "string",
      "reason": "string"
    }
  ],
  "attribute_id": "00000000-0000-0000-0000-000000000000",
  "content_hash": "string",
  "differs": [
    "string"
  ]
}
```
