# Get all categories

#### **End Point** <a href="#end-point" id="end-point"></a>

```javascript
{{base_url}}/categories
```

#### **API Description** <a href="#api-description" id="api-description"></a>

This API serves the purpose of retrieving a comprehensive list of all currently active categories within the MyIPR App, facilitating the seamless creation of certificates. It is imperative to note that a valid category ID is a prerequisite when generating a certificate. The response from this API furnishes a selection of suitable category IDs, allowing users to make informed choices during the certificate creation process.

#### **Method** <a href="#method" id="method"></a>

GET&#x20;

#### **Attributes** <a href="#api-body" id="api-body"></a>

<table><thead><tr><th width="140">Attribute</th><th width="101">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>status</strong></td><td>Integer</td><td>Represents the status of the API response.</td></tr><tr><td><strong>message</strong></td><td>String</td><td>Provides a message indicating the success or failure of the API request.</td></tr><tr><td><strong>result</strong></td><td>Array</td><td>An array containing objects with information about different categories.</td></tr><tr><td><strong>result.id</strong></td><td>Integer</td><td>Unique identifier for a category.</td></tr><tr><td><strong>result.name</strong></td><td>String</td><td>The name of the category.</td></tr></tbody></table>

#### Request <a href="#sample-request" id="sample-request"></a>

```javascript
// curl --location -g '{{base_url}}/categories' \
--header 'Authorization: SECRET {{secret_key}}'
```

#### Response <a href="#sample-response-success-response" id="sample-response-success-response"></a>

```javascript
// {
  "status": 201,
  "message": "success",
  "result": [
    {
      "id": 5,
      "name": "Music"
    },
    {
      "id": 7,
      "name": "Art"
    },
    {
      "id": 8,
      "name": "Culture"
    },
    {
      "id": 9,
      "name": "Buissness"
    },
    {
      "id": 10,
      "name": "Legal"
    },
    {
      "id": 11,
      "name": "Album"
    }
  ]
} 
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.myipr.io/myipr-open-api/api-guides/api-reference/get-all-categories.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
