--- title: "Requests and Responses" slug: "requests-and-responses" description: "Learn how API requests use HTTP methods, headers, parameters, JSON bodies, response codes, success payloads, and error details." tags: ["API Requests", "HTTP Methods"] status: "new" updated: 2026-12-01T15:02:52Z published: 2026-12-01T15:02:52Z canonical: "help.narmi.com/requests-and-responses" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.narmi.com/llms.txt > Use this file to discover all available pages before exploring further. # Requests and Responses ## Requests An endpoint's name indicates the type of data it handles and the action it performs on that data. The most common actions are: | Action | HTTP Method | Description | | --- | --- | --- | | Create | POST | Creates and persists an entity of the corresponding type. | | List | GET | Returns all instances of a particular entity that match query parameters you provide. | | Retrieve | GET | Returns the single instance of an entity that matches the identifier you provide. | | Update | PUT | Modifies the existing entity that matches the identifier you provide. | | Delete | DELETE | Deletes the existing entity that matches the identifier you provide. Deleted entities cannot be retrieved or undeleted. | All requests must include a header indicating the format of the response to be returned: ``` Accept: application/json ``` ### Providing Parameters The way you provide parameters to a request depends on the HTTP method of the request. #### GET For `GET` requests, you provide parameters in a query string you append to your request's URL. For example: ``` /v1/accounts/{account_uuids}/transactions/?settled_from=2026-01-01T00%3A00%3A00Z&page=2 ``` This example returns the second page of transactions settled on or after January 1, 2026, for the specified accounts. Values for query parameters must be URL-escaped. In the example above, the colons in the timestamp are encoded as `%3A`. #### DELETE Most `DELETE` endpoints identify the entity to delete by its identifier in the request's URL path. For example: ``` /v1/accounts/{uuid}/ ``` Some DELETE endpoints work differently. For example, they may take identifiers in a JSON request body, accept optional query parameters, or act on the authenticated user's own resource with no identifier. Check each endpoint's reference page for its required parameters. #### POST, PUT, and PATCH For `POST`, `PUT` and `PATCH` requests, you instead provide parameters as JSON in the body of your request. `POST` and `PUT` requests must include one additional header: ``` Content-Type: application/json ``` And in the body of the request: ``` { "given_name": "Amelia", "family_name": "Earhart" } ``` ## Responses [Conventional HTTP response codes](https://httpstatuses.com/) indicate the success or failure of an API request, not all errors map cleanly onto HTTP response codes, however. In general: | HTTP Response code | Indication | | --- | --- | | 2xx | success | | 4xx | an error that failed given the information provided (e.g., a required parameter was omitted, or the configuration does is invalid, etc.) | | 5xx | 5xx range indicate an error processing the request | ### Response Bodies When a request is successful, a response body will typically be sent back in the form of a JSON object and include a `Content-Type: application/json` header. One exception to this is when a DELETE request is processed, which will result in a successful HTTP 204 status and an empty response body. Inside of this JSON object, the resource root that was the target of the request will be set as the key. This will be the singular form of the word if the request operated on a single object, and the plural form of the word if a collection was processed. ### Response Meta-information Responses will have a [top level `meta` key](http://jsonapi.org/format/#document-meta) with meta information associated with the request. Common keys include: | key | description | example | | --- | --- | --- | | deprecated_at | | | | stability | | | | total | used in paginating responses | | ### Errors Failing responses will have an appropriate status and a JSON body containing more details about a particular error. | Name | Type | Description | Example | | --- | --- | --- | --- | | id | string | id of error raised | "rate_limit" | | message | string | end user message of error raised | "Your account reached the API limit. Please wait a few minutes before making new requests" | | url | string | reference url with more information about the error | https://example.com/developer/articles/rate-limits | ## Related - [Public API Overview](/public-api-overview.md) - [List user transactions](/list-user-transactions.md) - [List user transactions](/list-user-transactions-1.md)