# resource_not_found

- HTTP status: 404
- Retry: No
- Execution: not started
- Admin needed: no

**Resource not found.** The id does not name a resource this key can see. Ids are scoped to a workspace and a mode: a live-mode id is not found with a test key and vice versa, and another workspace's id is not found either.

## What it means

The API returns HTTP 404 with `error.code` set to `resource_not_found`. The default message is: "No such resource."

## Common causes

- A typo or a truncated id.
- An id from the other mode (test vs live).
- An id with the wrong prefix for this resource.
- The resource was deleted.

## How to identify it

Check the response status (`404`) and `error.code` (`resource_not_found`). Branch on `error.code`, not on the message text: messages can be reworded, codes do not change within v1. Log `error.request_id` (also sent as the `X-Request-Id` header) so support can find the request.

## How to fix it

- Check the id and the key mode. List the resource to find valid ids.

## Retry guidance

Sending the request unchanged fails the same way. Fix the cause first (see How to fix it), then send it again.

## Did anything happen?

This request was refused before any call was placed and before anything was charged.

## Idempotency

Nothing was done and nothing was stored (under an Idempotency-Key, if you sent one), so the request can be sent again, with the same key if you used one, once the cause is fixed.

## Who can fix it

The developer who sends the request can fix it; no administrator action is normally needed.

## When to contact support

If the error persists after the steps above, contact [support@relationsai.com](mailto:support@relationsai.com). See [Support](/resources/support) for what to include (the `request_id`, the time in UTC, the operation, and whether you used a test or live key) and what never to send (API keys, Authorization headers, webhook signing secrets, recording links, transcripts or customer data).

## Example error response

```json
{
  "error": {
    "code": "resource_not_found",
    "message": "No such resource.",
    "details": {},
    "request_id": "req_bic5uwhfw3xxme7xdhmjberw",
    "retry": "no",
    "doc_url": "https://docs.relationsai.com/errors/resource_not_found"
  }
}
```

## Operations that can return this error

- [`GET /agents/{agent_id}`](/api/agents#retrieve-an-agent): Retrieve an agent
- [`GET /agents/{agent_id}/readiness`](/api/agents#check-whether-an-agent-can-place-calls): Check whether an agent can place calls
- [`GET /phone-numbers/{phone_number_id}`](/api/phone-numbers#retrieve-a-phone-number): Retrieve a phone number
- [`GET /calls/{call_id}`](/api/calls#retrieve-a-call): Retrieve a call
- [`GET /calls/{call_id}/transcript`](/api/transcripts#retrieve-a-call-transcript): Retrieve a call transcript
- [`GET /calls/{call_id}/recording`](/api/recordings#retrieve-a-call-recording-link): Retrieve a call recording link
- [`GET /calls/{call_id}/analysis`](/api/analysis#retrieve-a-call-analysis): Retrieve a call analysis
- [`GET /recordings/{recording_token}`](/api/recordings#download-recording-audio): Download recording audio
- [`GET /campaigns/{campaign_id}`](/api/campaigns#retrieve-a-campaign): Retrieve a campaign
- [`PATCH /campaigns/{campaign_id}`](/api/campaigns#update-a-campaign): Update a campaign
- [`POST /campaigns/{campaign_id}/recipients`](/api/campaigns#add-recipients): Add recipients
- [`GET /campaigns/{campaign_id}/recipients`](/api/campaigns#list-recipients): List recipients
- [`POST /campaigns/{campaign_id}/start`](/api/campaigns#start-a-campaign): Start a campaign
- [`POST /campaigns/{campaign_id}/pause`](/api/campaigns#pause-a-campaign): Pause a campaign
- [`POST /campaigns/{campaign_id}/resume`](/api/campaigns#resume-a-campaign): Resume a campaign
- [`POST /campaigns/{campaign_id}/stop`](/api/campaigns#stop-a-campaign): Stop a campaign
- [`GET /contacts/{contact_id}`](/api/contacts#retrieve-a-contact): Retrieve a contact
- [`PATCH /contacts/{contact_id}`](/api/contacts#update-a-contact): Update a contact
- [`DELETE /contacts/{contact_id}`](/api/contacts#delete-a-contact): Delete a contact
- [`DELETE /dnc-entries/{dnc_entry_id}`](/api/do-not-call-list#remove-a-number-from-the-do-not-call-list): Remove a number from the do-not-call list
- [`GET /webhook-endpoints/{webhook_endpoint_id}`](/api/webhook-endpoints#retrieve-a-webhook-endpoint): Retrieve a webhook endpoint
- [`PATCH /webhook-endpoints/{webhook_endpoint_id}`](/api/webhook-endpoints#update-a-webhook-endpoint): Update a webhook endpoint
- [`DELETE /webhook-endpoints/{webhook_endpoint_id}`](/api/webhook-endpoints#delete-a-webhook-endpoint): Delete a webhook endpoint
- [`POST /webhook-endpoints/{webhook_endpoint_id}/rotate-secret`](/api/webhook-endpoints#rotate-a-webhook-signing-secret): Rotate a webhook signing secret
- [`POST /webhook-endpoints/{webhook_endpoint_id}/test`](/api/webhook-endpoints#send-a-test-event): Send a test event
- [`GET /webhook-endpoints/{webhook_endpoint_id}/deliveries`](/api/webhook-endpoints#list-deliveries): List deliveries
- [`POST /webhook-deliveries/{webhook_delivery_id}/retry`](/api/webhook-endpoints#retry-a-delivery): Retry a delivery
- [`POST /calls`](/api/calls#place-a-call): Place a call
- [`POST /campaigns`](/api/campaigns#create-a-campaign): Create a campaign
- [`PATCH /campaigns/{campaign_id}`](/api/campaigns#update-a-campaign): Update a campaign

See all codes in the [error-code reference](/fundamentals/error-codes).
