{{ __('locale.developers.api_endpoint') }}
{{ route('api.contacts.index') }}
{{ __('locale.developers.parameter') }} | {{ __('locale.labels.required') }} | {{ __('locale.labels.description') }} |
---|---|---|
Authorization |
{{ __('locale.labels.yes') }}
|
When calling our API, send your api token with the authentication type set as Bearer (Example: Authorization: Bearer {api_token} ) |
Accept |
{{ __('locale.labels.yes') }}
|
Set to application/json |
Creates a new group object. {{ config('app.name') }} returns the created group object with each request.
{{ __('locale.developers.api_endpoint') }}
{{config('app.url')}}/api/v3/contacts
{{ __('locale.developers.parameter') }} | {{ __('locale.labels.required') }} | {{ __('locale.labels.type') }} | {{ __('locale.labels.description') }} |
---|---|---|---|
name |
{{ __('locale.labels.yes') }}
|
string | The name of the group |
curl -X POST {{ route('api.contacts.store') }} \
-H 'Authorization: Bearer {{ Auth::user()->api_token }}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"name":"Codeglen"}'
Returns a contact object if the request was successful.
{
"status": "success",
"data": "group data with all details",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}
Retrieves the information of an existing group. You only need to supply the unique group ID that was returned upon creation or receiving.
{{ __('locale.developers.api_endpoint') }}
{{config('app.url')}}/api/v3/contacts/{group_id}/show/
{{ __('locale.developers.parameter') }} | {{ __('locale.labels.required') }} | {{ __('locale.labels.type') }} | {{ __('locale.labels.description') }} |
---|---|---|---|
group_id |
{{ __('locale.labels.yes') }}
|
string | Contact Groups uid |
curl -X POST {{ route('api.contacts.show', ['group_id' => '6065ecdc9184a']) }} \
-H 'Authorization: Bearer {{ Auth::user()->api_token }}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
Returns a contact object if the request was successful.
{
"status": "success",
"data": "group data with all details",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}
Updates an existing group. You only need to supply the unique ID that was returned upon creation.
{{ __('locale.developers.api_endpoint') }}
{{config('app.url')}}/api/v3/contacts/{group_id}
{{ __('locale.developers.parameter') }} | {{ __('locale.labels.required') }} | {{ __('locale.labels.type') }} | {{ __('locale.labels.description') }} |
---|---|---|---|
group_id |
{{ __('locale.labels.yes') }}
|
string | Contact Groups uid |
name |
{{ __('locale.labels.yes') }}
|
string | New group name |
curl -X PATCH {{ route('api.contacts.update', ['contact' => '6065ecdc9184a']) }} \
-H 'Authorization: Bearer {{ Auth::user()->api_token }}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"name":"Codeglen Update"}'
Returns a contact object if the request was successful.
{
"status": "success",
"data": "groups data with all details",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}
Deletes an existing group. You only need to supply the unique id that was returned upon creation.
{{ __('locale.developers.api_endpoint') }}
{{config('app.url')}}/api/v3/contacts/{group_id}
{{ __('locale.developers.parameter') }} | {{ __('locale.labels.required') }} | {{ __('locale.labels.type') }} | {{ __('locale.labels.description') }} |
---|---|---|---|
group_id |
{{ __('locale.labels.yes') }}
|
string | Contact Groups uid |
curl -X DELETE {{ route('api.contacts.destroy', ['contact' => '6065ecdc9184a']) }} \
-H 'Authorization: Bearer {{ Auth::user()->api_token }}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
Returns a contact object if the request was successful.
{
"status": "success",
"data": "null",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}
{{ __('locale.developers.api_endpoint') }}
{{config('app.url')}}/api/v3/contacts/
curl -X GET {{ route('api.contacts.index') }} \
-H 'Authorization: Bearer {{ Auth::user()->api_token }}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
Returns a contact object if the request was successful.
{
"status": "success",
"data": "group data with pagination",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}