> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aranx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Verify IndexNow Key File

> Checks the IndexNow key file on every host now

```
POST /api/v1/public/indexnow/verify
```

Checks the key file on every listed host now and returns the same body as
[Get IndexNow Key](https://docs.aranx.com/api-reference/indexnow/get-indexnow.md). Call it after you
serve the key file, and confirm that each host shows `status: "verified"`.

You do not need to call it again later. Aranx checks the key file about every
24 hours on its own.

## Request body

The body is optional.

| Field | Type | Required | Description |
| - | - | - | - |
| `host` | `string` | No | A host to add to the list before the check. It must be the site's host, the site's host without `www.`, or a subdomain of it, for example `example.com` or `blog.example.com` for `www.example.com`. A website has at most 10 hosts |

## Example request

```typescript TypeScript theme={null}
const response = await fetch(
  'https://api.aranx.com/api/v1/public/indexnow/verify',
  {
    method: 'POST',
    headers: {
      Authorization: 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ host: 'blog.example.com' })
  }
);
const data = await response.json();
```

```python Python theme={null}
import requests

response = requests.post(
    "https://api.aranx.com/api/v1/public/indexnow/verify",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"host": "blog.example.com"},
)
data = response.json()
```

```bash curl theme={null}
curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"host": "blog.example.com"}' \
  https://api.aranx.com/api/v1/public/indexnow/verify
```

## Response

```json theme={null}
{
  "key": "3f2a9c41d07e4b6a8c5d2e1f0a9b8c7d",
  "key_file": "3f2a9c41d07e4b6a8c5d2e1f0a9b8c7d.txt",
  "hosts": [
    {
      "host": "www.example.com",
      "key_file_url": "https://www.example.com/3f2a9c41d07e4b6a8c5d2e1f0a9b8c7d.txt",
      "status": "verified",
      "last_checked_at": "2026-11-19T10:00:00.000Z",
      "last_verified_at": "2026-11-19T10:00:00.000Z",
      "last_error": null
    },
    {
      "host": "blog.example.com",
      "key_file_url": "https://blog.example.com/3f2a9c41d07e4b6a8c5d2e1f0a9b8c7d.txt",
      "status": "not_set_up",
      "last_checked_at": "2026-11-19T10:00:00.000Z",
      "last_verified_at": null,
      "last_error": "The key file redirects. Serve it directly with a 200."
    }
  ]
}
```

See [Get IndexNow Key](https://docs.aranx.com/api-reference/indexnow/get-indexnow.md#response-fields) for
the fields and status values.

## Error responses

| Status | Description |
| - | - |
| `400` | `invalid_host`: `host` is not the site's host, the site's host without `www.`, or a subdomain of it |
| `400` | `too_many_hosts`: the website has 10 hosts, so `host` cannot be added |
| `401` | Missing or invalid API key |
| `403` | Subscription inactive |
| `429` | `rate_limited`: you called this endpoint within the last 60 seconds. Or the rate limit is exceeded |

Example error:

```json theme={null}
{
  "error": "invalid_host",
  "message": "host must be the site host, the site host without \"www.\", or a subdomain of it."
}
```


## OpenAPI

````yaml POST /api/v1/public/indexnow/verify
openapi: 3.1.0
info:
  title: Aranx Public API
  description: >-
    REST API for accessing articles and categories from your Aranx-powered blog,
    and for setting up IndexNow.
  version: 1.0.0
servers:
  - url: https://api.aranx.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Articles
    description: >-
      Retrieve blog articles and their content, and report their publication
      status on your site.
  - name: Categories
    description: >-
      Manage blog categories. Write operations (create, update, delete) are only
      available for API connection types.
  - name: IndexNow
    description: >-
      Get the IndexNow key of your website and check the key file on each host.
      Aranx submits article URLs to IndexNow only for hosts whose key file it
      verified.
paths:
  /api/v1/public/indexnow/verify:
    post:
      tags:
        - IndexNow
      summary: Verify IndexNow key file
      description: >-
        Checks the key file on every listed host now and returns the same body
        as `GET /api/v1/public/indexnow`. Send `host` to add a host to the list
        before the check. You can call this endpoint once every 60 seconds.
      operationId: verifyIndexNow
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VerifyIndexNowRequest'
      responses:
        '200':
          description: The IndexNow key and the status of each host after the check.
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IndexNowState'
        '400':
          description: >-
            `host` is not the site's host, the site's host without `www.`, or a
            subdomain of it (`invalid_host`). Or the website already has 10
            hosts (`too_many_hosts`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IndexNowError'
              example:
                error: invalid_host
                message: >-
                  host must be the site host, the site host without "www.", or a
                  subdomain of it.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          description: >-
            You called this endpoint again within 60 seconds (`rate_limited`),
            or you exceeded the rate limit of 100 requests per minute. The
            second case returns the standard error body and the rate limit
            headers.
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/IndexNowError'
                  - $ref: '#/components/schemas/Error'
              example:
                error: rate_limited
                message: Wait 60 seconds between checks.
components:
  schemas:
    VerifyIndexNowRequest:
      type: object
      additionalProperties: false
      properties:
        host:
          type: string
          description: >-
            Host to add to the list before the check. It must be the site's
            host, the site's host without `www.`, or a subdomain of it. A
            website has at most 10 hosts.
          example: blog.example.com
    IndexNowState:
      type: object
      required:
        - key
        - key_file
        - hosts
      properties:
        key:
          type: string
          pattern: ^[0-9a-f]{32}$
          description: >-
            The IndexNow key of your website. Aranx generates one key per
            website.
          example: 3f2a9c41d07e4b6a8c5d2e1f0a9b8c7d
        key_file:
          type: string
          description: >-
            Name of the key file. Serve it at the root of each host. Its only
            content is `key`.
          example: 3f2a9c41d07e4b6a8c5d2e1f0a9b8c7d.txt
        hosts:
          type: array
          description: >-
            Hosts that Aranx submits URLs for. The first item is the host of the
            connection's site URL. Aranx adds a host when you report an article
            URL on that host.
          items:
            $ref: '#/components/schemas/IndexNowHost'
    IndexNowError:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          enum:
            - invalid_host
            - too_many_hosts
            - rate_limited
          description: Error code.
        message:
          type: string
          description: A human-readable error message.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: A human-readable error message.
          example: Invalid API key
        details:
          type: object
          description: Field-level validation errors, if applicable.
          additionalProperties:
            type: array
            items:
              type: string
    IndexNowHost:
      type: object
      required:
        - host
        - key_file_url
        - status
        - last_checked_at
        - last_verified_at
        - last_error
      properties:
        host:
          type: string
          description: Host name. `www.example.com` and `example.com` are separate hosts.
          example: www.example.com
        key_file_url:
          type: string
          format: uri
          description: URL where Aranx checks the key file on this host.
          example: https://www.example.com/3f2a9c41d07e4b6a8c5d2e1f0a9b8c7d.txt
        status:
          $ref: '#/components/schemas/IndexNowHostStatus'
        last_checked_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When Aranx last checked the key file. `null` before the first check.
          example: '2026-11-19T10:00:00.000Z'
        last_verified_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the key file last passed the check. `null` if it never passed.
          example: '2026-11-19T10:00:00.000Z'
        last_error:
          type:
            - string
            - 'null'
          description: >-
            Short English reason for the last failed check. `null` when the last
            check passed or no check ran.
          example: null
    IndexNowHostStatus:
      type: string
      enum:
        - not_set_up
        - verified
        - failing
      description: >-
        `not_set_up`: the key file never passed a check. `verified`: the last
        check passed, and Aranx submits URLs on this host. `failing`: the host
        was verified before or IndexNow rejected the key, and the key file no
        longer passes the check. Aranx submits no URLs on this host until the
        file passes again.
      example: verified
  headers:
    X-RateLimit-Limit:
      description: Maximum number of requests allowed per minute.
      schema:
        type: integer
        example: 100
    X-RateLimit-Remaining:
      description: Number of requests remaining in the current window.
      schema:
        type: integer
        example: 95
    X-RateLimit-Reset:
      description: Unix timestamp (seconds) when the rate limit window resets.
      schema:
        type: integer
        example: 1700000000
  responses:
    Unauthorized:
      description: >-
        Authentication failed. Check that your API key is valid and passed as a
        Bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Invalid API key
    Forbidden:
      description: Your subscription is inactive. Reactivate it in the Aranx dashboard.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 'API access suspended: subscription inactive'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key from your Aranx dashboard. Pass it as a Bearer token in the
        `Authorization` header.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.