Skip to main content

Phonebook Option Store

This API allows you to store a phonebook option.

📍 Endpoint

POST {base_url}/api/phonebooks/options

🧾 Headers

KeyValue
AuthorizationYOUR_TOKEN_HERE
Content-Typeapplication/json

📤 Request Body

{
"type": "int",
"title": "option1"
}

📝 Parameters

ParameterTypeRequiredDescription
typestringYesThe type of the option. Can be int, string, or date.
titlestringYesThe title of the option.

✅ Success Response

{
"data": {
"id": 123456,
"title": "option1",
"type": "int",
"created_at": "2025-05-19T08:47:27+00:00"
},
"meta": {
"status": true,
"message": "انجام شد",
"message_code": "200-1"
}
}

❌ Error Response — Invalid or Expired Token (401)

{
"data": null,
"meta": {
"status": false,
"message": "اطلاعات وارد شده صحیح نمی باشد",
"message_parameters": [],
"message_code": "400-1",
"errors": {}
}
}

🧪 Example Request

curl --location --globoff '{base_url}/api/phonebooks/options' \
--header 'Authorization: API TOKEN' \
--header 'Accept: application/json' \
--data '{
"type": "int",
"title": "option1"
}'