---
title: "Make your first request"
description: "Walk through a complete request and response, from headers to status codes."
url: "https://nov18-prod-sg.movespot.fyi/guides/first-request"
image: "https://nov18-prod-sg.movespot.fyi/_og/d/c_Ocean.takumi,title_Make+your+first+request,description_~V2FsayB0aHJvdWdoIGEgY29tcGxldGUgcmVxdWVzdCBhbmQgcmVzcG9uc2UsIGZyb20gaGVhZGVycyB0byBzdGF0dXMgY29kZXMu,props_eyJ0aGVtZSI6eyJtb2RlIjoibGlnaHQiLCJjb2xvcnMiOnsicHJpbWFyeSI6IiNDQjUzMjQifX19,p_Ii9ndWlkZXMvZmlyc3QtcmVxdWVzdCI,s_FHEPCMqN9vcbmgie.png"
---

# Make your first request

Walk through a complete request and response, from headers to status codes.

## [Before you begin](#before-you-begin)

You need an API key. If you don't have one yet, follow the [Quickstart](https://nov18-prod-sg.movespot.fyi/guides/quickstart) and export it:

```bash
export API_KEY="paste-your-key-here"
```

## [Anatomy of a request](#anatomy-of-a-request)

Every request has the same four parts:

```bash
curl "https://api.example.com/v1/orders?limit=1" \
  -X GET \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json"
```

| Part                 | What it does                                     |
| :------------------- | :----------------------------------------------- |
| URL                  | The endpoint, including the version prefix /v1   |
| Method               | GET to read data, POST to create it              |
| Authorization header | Your credential, so the API knows who is calling |
| Query or body        | Filters and data, depending on the endpoint      |

## [Read data](#read-data)

Fetch your most recent order:

```bash
curl "https://api.example.com/v1/orders?limit=1" \
  -H "Authorization: Bearer $API_KEY"
```

A successful call returns `200 OK`:

```json
{
  "data": [
    {
      "id": "ord_1042",
      "status": "shipped",
      "total": 129.00
    }
  ],
  "has_more": false
}
```

## [Write data](#write-data)

Create a resource with a `POST` request and a JSON body:

```bash
curl "https://api.example.com/v1/orders" \
  -X POST \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"total": 42.50, "currency": "USD"}'
```

A successful create returns `201 Created` and the new resource, including its `id`.

## [Check the response](#check-the-response)

| Status                   | Meaning                                   | What to do                             |
| :----------------------- | :---------------------------------------- | :------------------------------------- |
| 200 OK                   | The request succeeded.                    | Read the JSON body.                    |
| 201 Created              | A resource was created.                   | Save the id for later calls.           |
| 401 Unauthorized         | The key is missing, revoked, or mistyped. | Check the Authorization header.        |
| 422 Unprocessable Entity | The body failed validation.               | Read the error field, fix the request. |
| 429 Too Many Requests    | You're over your rate limit.              | Back off and retry. See Rate limits.   |

## [Next steps](#next-steps)

### Authentication

API keys, OAuth 2.0 tokens, and rotating credentials safely.

<https://nov18-prod-sg.movespot.fyi/guides/authentication>

### Pagination

Page through large result sets without skipping or repeating items.

<https://nov18-prod-sg.movespot.fyi/guides/pagination>

### Browse the APIs

Find the endpoints you need, with references and code samples.

<https://nov18-prod-sg.movespot.fyi/apis>