---
title: "Create a Magic Job"
method: POST
path: "/magic-jobs"
tags: ["Magic Jobs"]
---

# Create a Magic Job

`POST /magic-jobs`

## Request

- Base URL: `https://api.snappr.com`
- URL: `https://api.snappr.com/magic-jobs`
- Auth: HTTP bearer

Creates a Magic Job. It is returned with status `created`; Snappr then locates the business's
listing, generates the images and delivers them in one or more batches. Each delivery triggers an
`images_delivered` webhook event.

## Headers

- `accept-version` string

## Request body

- MagicJobCreate
  - `type` 'menu', required: Type of Magic Job.
  - `restaurant_name` string: Name of the restaurant as it appears on your platform. Required when `type` is `menu`.
  - `restaurant_address` string: Full address of the restaurant as a single string. Required when `type` is `menu`.
  - `internal_id` string: Your own identifier, for matching the job with your data.
  - `source_url` string, uri: URL of the restaurant's store page on your platform. If omitted, Snappr locates it from the name, address and `internal_id`.

## Response `201`

Magic Job created.

- MagicJob
  - `uid` string, uuid, required
  - `type` 'menu', required
  - `status` 'created' | 'in_progress' | 'completed' | 'failed', required
  - `completed_at` string, date-time, nullable
  - `restaurant_name` string, nullable
  - `restaurant_address` string, nullable
  - `source_platform` string, nullable: Platform Snappr found the listing on.
  - `source_url` string, uri, nullable
  - `internal_id` string, nullable
  - `images_count` integer: Number of delivered images. Present only when `status` is `completed`.
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `400`: The request was invalid, or could not be fulfilled (validation failure, no coverage, no availability, location outside your region).
- `401`: The API key is missing or invalid, or its user is not an admin of the account.
- `402`: The account does not have enough credits. Add credits in the Snappr portal.
- `429`: Rate limit exceeded (1,000 requests per minute per API key).
- `500`: Unexpected server error. Try again later.

---

[API](https://skmtc.dev/snappr/apis/snappr-api.md) - [All operations](https://skmtc.dev/snappr/apis/snappr-api/llms.txt) - [OpenAPI document](https://skmtc.dev/snappr/apis/snappr-api/revisions/dd0648363a82?raw)
