Introduction

This documentation aims to provide all the information you need to work with our API. Please refer to our documentation How to start with the Magnetis API ?

Authenticating requests

To authenticate requests, include a x-api-key header with the value "{YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your token by visiting your dashboard and clicking Generate API token.

Alerts

Email alerts


List all email alerts

GET
https://api.magnetis.io
/alerts/email
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

account_id
Optional. Filter by account ID.
Example:
acc-XXX
limit
Optional. Result per page. 250 if not set.
Example:
250
page
Optional. Pagination page. 1 if not set.
Example:
1

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/alerts/email" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": "ale-b098cb40-c57b-4a2b-bf5c-70348741ed91",
            "account": {
                "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
                "name": "Immobilier tertiaire"
            },
            "created_at": "2024-03-04 09:06:09",
            "enabled": 1,
            "less_than": 23,
            "more_than": null,
            "recipients": [
                "example@email.fr"
            ],
            "title": "Alerte sur appel personnalisé",
            "type": "custom_calls"
        },
        {
            "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
            "account": {
                "id": "acc-6a29eed8-af46-4a4c-bd4b-e4d44f7b345f",
                "name": "Immobilier tertiaire"
            },
            "created_at": "2024-03-04 09:06:10",
            "enabled": 1,
            "less_than": null,
            "more_than": null,
            "recipients": [
                "example@email.fr"
            ],
            "title": "Alerte sur appel manqué",
            "type": "lost_calls"
        },
        {
            "id": "ale-5f695e85-1508-4365-9ade-56ab6d9b861a",
            "account": {
                "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
                "name": "Immobilier tertiaire"
            },
            "created_at": "2024-03-04 09:06:10",
            "enabled": 1,
            "less_than": null,
            "more_than": null,
            "recipients": [
                "example@email.fr"
            ],
            "title": "Alerte sur tous les appels",
            "type": "all_calls"
        }
    ],
    "links": {
        "first": "https://api.magnetis.io/alerts/email?page=1",
        "last": "https://api.magnetis.io/alerts/email?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://api.magnetis.io/alerts/email",
        "per_page": 250,
        "to": 3,
        "total": 3,
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        }
    }
}

Create an email alert

POST
https://api.magnetis.io
/alerts/email
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Response Fields

Example request:
curl --request POST \
    "https://api.magnetis.io/alerts/email" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"account_id\": \"acc-6e64b651-026a-46de-ab3e-944a193945a9\",
    \"title\": \"Alerte sur appel manqué\",
    \"type\": \"custom_calls\",
    \"more_than\": 20,
    \"less_than\": \"\",
    \"enabled\": false,
    \"recipients\": [
        \"amazingemail@email.com\",
        \"thebestemail@email.com\"
    ]
}"
Example response:
{
    "data": {
        "id": "ale-b098cb40-c57b-4a2b-bf5c-70348741ed91",
        "account": {
            "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
            "name": "Immobilier tertiaire"
        },
        "created_at": "2024-03-04 09:06:09",
        "enabled": 1,
        "less_than": 23,
        "more_than": null,
        "recipients": [
            "example@email.fr"
        ],
        "title": "Alerte sur appel personnalisé",
        "type": "custom_calls"
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2024-03-04 09:12:08",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 3
    }
}

Fetch an email alert

GET
https://api.magnetis.io
/alerts/email/{id}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

The id of the alert.

Example:
ale-06529b90-73e1-4f8d-b654-aa1f8116ab41

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/alerts/email/ale-06529b90-73e1-4f8d-b654-aa1f8116ab41" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": "ale-b098cb40-c57b-4a2b-bf5c-70348741ed91",
        "account": {
            "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
            "name": "Immobilier tertiaire"
        },
        "created_at": "2024-03-04 09:06:09",
        "enabled": 1,
        "less_than": 23,
        "more_than": null,
        "recipients": [
            "example@email.fr"
        ],
        "title": "Alerte sur appel personnalisé",
        "type": "custom_calls"
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2024-03-04 09:12:08",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 3
    }
}

Update an email alert

PUT
PATCH
https://api.magnetis.io
/alerts/email/{id}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

The ID of the alert.

Example:
ale-06529b90-73e1-4f8d-b654-aa1f8116ab41

Body Parameters

Response Fields

Example request:
curl --request PUT \
    "https://api.magnetis.io/alerts/email/ale-06529b90-73e1-4f8d-b654-aa1f8116ab41" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Alerte sur appel manqué\",
    \"type\": \"custom_calls\",
    \"more_than\": 20,
    \"less_than\": \"\",
    \"enabled\": false,
    \"recipients\": [
        \"amazingemail@email.com\",
        \"thebestemail@email.com\"
    ]
}"
Example response:
{
    "data": {
        "id": "ale-b098cb40-c57b-4a2b-bf5c-70348741ed91",
        "account": {
            "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
            "name": "Immobilier tertiaire"
        },
        "created_at": "2024-03-04 09:06:09",
        "enabled": 1,
        "less_than": 23,
        "more_than": null,
        "recipients": [
            "example@email.fr"
        ],
        "title": "Alerte sur appel personnalisé",
        "type": "custom_calls"
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2024-03-04 09:12:08",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 3
    }
}

Delete an email alert

DELETE
https://api.magnetis.io
/alerts/email/{id}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

The ID of the alert.

Example:
ale-06529b90-73e1-4f8d-b654-aa1f8116ab41

Response Fields

Example request:
curl --request DELETE \
    "https://api.magnetis.io/alerts/email/ale-06529b90-73e1-4f8d-b654-aa1f8116ab41" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [],
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 0
    }
}

SMS alerts


List all SMS alerts

GET
https://api.magnetis.io
/alerts/sms
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

account_id
Optional. Filter by account ID.
Example:
acc-XXX
limit
Optional. Result per page. 250 if not set.
Example:
250
page
Optional. Pagination page. 1 if not set.
Example:
1

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/alerts/sms" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": "als-cccd40bf-3e4d-42fb-ad5a-76040aa03171",
            "account": {
                "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
                "name": "Immobilier tertiaire"
            },
            "additional_recipients": [
                "rcp-bde9497b-ffe6-45db-8ffc-cd62b4260a59"
            ],
            "all_tracked_numbers": 0,
            "created_at": "2024-03-01 14:52:44",
            "enabled": 1,
            "landing_page": null,
            "less_than": null,
            "more_than": null,
            "notification_emails": [],
            "notification_recipients": [],
            "numbers": [],
            "pools": [],
            "send_to": "caller",
            "sms_template": {
                "id": "sds-a1cc1722-271e-4eb4-b66a-012cb7f3f244",
                "account": {
                    "id": "acc-51ce00db-b50b-4b3d-ad4d-9b19155d46b5",
                    "name": "Immobilier tertiaire"
                },
                "created_at": "2024-03-01 14:52:46",
                "entity": null,
                "from": "InfoAppel",
                "network": null,
                "nb_characters": null,
                "nb_sms": null,
                "text": "Bonjour, merci pour votre appel. Nous sommes actuellement indisponibles, mais vous pouvez nous joindre via notre site internet, www.monsite.fr. A très vite!",
                "title": "Appel Manqué Appelant",
                "user": {
                    "id": "usr-78a51d97-1bd2-467e-b67c-bb683014e84c",
                    "created_at": "2024-03-01T13:52:43.000000Z",
                    "email": "John.Doe@email.fr",
                    "firstname": "John",
                    "lang": "fr",
                    "lastname": "Doe",
                    "phone": "06 38 39 XX XX"
                }
            },
            "title": "Alerte par sms",
            "type": "lost_calls"
        },
        {
            "id": "als-88530b44-7887-4747-88d7-e5da1955ebac",
            "account": {
                "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
                "name": "Immobilier tertiaire"
            },
            "additional_recipients": [
                "rcp-bde9497b-ffe6-45db-8ffc-cd62b4260a59"
            ],
            "all_tracked_numbers": 0,
            "created_at": "2024-03-01 14:52:44",
            "enabled": 1,
            "landing_page": null,
            "less_than": null,
            "more_than": null,
            "notification_emails": [],
            "notification_recipients": [],
            "numbers": [],
            "pools": [],
            "send_to": "caller",
            "sms_template": {
                "id": "sds-a1cc1722-271e-4eb4-b66a-012cb7f3f244",
                "account": {
                    "id": "acc-51ce00db-b50b-4b3d-ad4d-9b19155d46b5",
                    "name": "Immobilier tertiaire"
                },
                "created_at": "2024-03-01 14:52:46",
                "entity": null,
                "from": "InfoAppel",
                "network": null,
                "nb_characters": null,
                "nb_sms": null,
                "text": "Bonjour, merci pour votre appel. Nous sommes actuellement indisponibles, mais vous pouvez nous joindre via notre site internet, www.monsite.fr. A très vite!",
                "title": "Appel Manqué Appelant",
                "user": {
                    "id": "usr-78a51d97-1bd2-467e-b67c-bb683014e84c",
                    "created_at": "2024-03-01T13:52:43.000000Z",
                    "email": "John.Doe@email.fr",
                    "firstname": "John",
                    "lang": "fr",
                    "lastname": "Doe",
                    "phone": "06 38 39 XX XX"
                }
            },
            "title": "Alerte par sms",
            "type": "lost_calls"
        },
        {
            "id": "als-2a709bdd-f7e2-45bd-a86b-12633de528ec",
            "account": {
                "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
                "name": "Immobilier tertiaire"
            },
            "additional_recipients": [
                "rcp-2765bc4d-9f7f-4324-8c83-11262bb4c0fd"
            ],
            "all_tracked_numbers": 0,
            "created_at": "2024-03-01 14:52:44",
            "enabled": 1,
            "landing_page": null,
            "less_than": null,
            "more_than": null,
            "notification_emails": [],
            "notification_recipients": [],
            "numbers": [],
            "pools": [],
            "send_to": "caller",
            "sms_template": {
                "id": "sds-a1cc1722-271e-4eb4-b66a-012cb7f3f244",
                "account": {
                    "id": "acc-51ce00db-b50b-4b3d-ad4d-9b19155d46b5",
                    "name": "Immobilier tertiaire"
                },
                "created_at": "2024-03-01 14:52:46",
                "entity": null,
                "from": "InfoAppel",
                "network": null,
                "nb_characters": null,
                "nb_sms": null,
                "text": "Bonjour, merci pour votre appel. Nous sommes actuellement indisponibles, mais vous pouvez nous joindre via notre site internet, www.monsite.fr. A très vite!",
                "title": "Appel Manqué Appelant",
                "user": {
                    "id": "usr-78a51d97-1bd2-467e-b67c-bb683014e84c",
                    "created_at": "2024-03-01T13:52:43.000000Z",
                    "email": "John.Doe@email.fr",
                    "firstname": "John",
                    "lang": "fr",
                    "lastname": "Doe",
                    "phone": "06 38 39 XX XX"
                }
            },
            "title": "Alerte par sms",
            "type": "lost_calls"
        },
        {
            "id": "als-f3f2849a-e306-4a00-b539-45bc48b95b61",
            "account": {
                "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
                "name": "Immobilier tertiaire"
            },
            "additional_recipients": [],
            "all_tracked_numbers": 1,
            "created_at": "2024-03-07 10:34:09",
            "enabled": 1,
            "landing_page": {
                "id": "8810c59a-c05c-4801-a3e7-c77308296c9c",
                "account": {
                    "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
                    "name": "Immobilier tertiaire"
                },
                "created_at": "2024-01-01 01:00:00",
                "entity": null,
                "network": null,
                "title": "Ma Landing Page",
                "url": "https://www.mywebsite.fr"
            },
            "less_than": null,
            "more_than": null,
            "notification_emails": [],
            "notification_recipients": [],
            "numbers": [],
            "pools": [],
            "send_to": "caller",
            "sms_template": {
                "id": "sds-3712da26-d91e-4d9a-8545-2a6a4023231b32",
                "account": {
                    "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
                    "name": "Immobilier tertiaire"
                },
                "created_at": "2024-03-01 14:52:46",
                "entity": null,
                "from": "InfoAppel",
                "network": null,
                "nb_characters": 2121,
                "nb_sms": 2,
                "text": "Nous avons raté votre appel, completer le question ##LIENTRACKEVERSLANDPAGE## pour que nous puissions vous recontacter. A bientôt.",
                "title": "Appel Manqué Appelé",
                "user": {
                    "id": "usr-78a51d97-1bd2-467e-b67c-bb683014e84c",
                    "created_at": "2024-03-01 14:52:43",
                    "email": "John.Doe@email.fr",
                    "firstname": "John",
                    "lang": "fr",
                    "lastname": "Doe",
                    "phone": "06 38 39 XX XX"
                }
            },
            "title": "Sms de landing page",
            "type": "lost_calls"
        }
    ],
    "links": {
        "first": "https://api.magnetis.io/alerts/sms?page=1",
        "last": "https://api.magnetis.io/alerts/sms?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://api.magnetis.io/alerts/sms",
        "per_page": 250,
        "to": 4,
        "total": 4,
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        }
    }
}

Create a SMS alert

POST
https://api.magnetis.io
/alerts/sms
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

The unique ID of the alert.

Example:
als-06529b90-73e1-4f8d-b654-aa1f8116ab41

Body Parameters

Response Fields

Example request:
curl --request POST \
    "https://api.magnetis.io/alerts/sms" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"additional_recipients\": false,
    \"all_tracked_numbers\": false,
    \"enabled\": null,
    \"landing_page_id\": \"ldp-53470c4d-7721-4490-bd22-237066afd5c5\",
    \"less_than\": 15,
    \"more_than\": 6,
    \"notification_emails\": [
        \"amazingemail@email.com\",
        \"thebestemail@email.com\"
    ],
    \"notification_recipients\": [
        \"rcp-8b514c55-f135-48da-83e4-1a1cd3cccb84\",
        \"rcp-75e932ca-6714-4088-b571-e6047a0dd1c6\"
    ],
    \"numbers\": [
        \"num-50700e9e-879e-480a-859a-1db8301bd712\",
        \"num-87b2e273-29c7-41a9-bd7e-66748d9cdf40\"
    ],
    \"pools\": [
        \"pul-50700e9e-879e-480a-859a-1db8301bd712\",
        \"pul-87b2e273-29c7-41a9-bd7e-66748d9cdf40\"
    ],
    \"send_to\": \"caller\",
    \"sms_template_id\": \"sds-8dc0d51c-bd63-4aaf-ab64-6fb46edb17ac\",
    \"title\": \"Alerte avec Landing Page\",
    \"type\": \"custom_calls\",
    \"account_id\": \"acc-6e64b651-026a-46de-ab3e-944a193945a9\"
}"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 600
                                                                                                                    x-ratelimit-remaining
                                                            : 593
                                                         
{
    "error": "Api key is invalid",
    "data": []
}

Fetch a SMS alert

GET
https://api.magnetis.io
/alerts/sms/{id}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

The id of the alert.

Example:
als-06529b90-73e1-4f8d-b654-aa1f8116ab41

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/alerts/sms/als-06529b90-73e1-4f8d-b654-aa1f8116ab41" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": "als-f3f2849a-e306-4a00-b539-45bc48b95b61",
        "account": {
            "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
            "name": "Immobilier tertiaire"
        },
        "additional_recipients": [],
        "all_tracked_numbers": 1,
        "created_at": "2024-03-07 10:34:09",
        "enabled": 1,
        "landing_page": {
            "id": "8810c59a-c05c-4801-a3e7-c77308296c9c",
            "account": {
                "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
                "name": "Immobilier tertiaire"
            },
            "created_at": "2024-01-01 01:00:00",
            "entity": null,
            "network": null,
            "title": "Ma Landing Page",
            "url": "https://www.mywebsite.fr"
        },
        "less_than": null,
        "more_than": null,
        "notification_emails": [],
        "notification_recipients": [],
        "numbers": [],
        "pools": [],
        "send_to": "caller",
        "sms_template": {
            "id": "sds-3712da26-d91e-4d9a-8545-2a6a4023231b32",
            "account": {
                "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
                "name": "Immobilier tertiaire"
            },
            "created_at": "2024-03-01 14:52:46",
            "entity": null,
            "from": "InfoAppel",
            "network": null,
            "nb_characters": 2121,
            "nb_sms": 2,
            "text": "Nous avons raté votre appel, completer le question ##LIENTRACKEVERSLANDPAGE## pour que nous puissions vous recontacter. A bientôt.",
            "title": "Appel Manqué Appelé",
            "user": {
                "id": "usr-78a51d97-1bd2-467e-b67c-bb683014e84c",
                "created_at": "2024-03-01 14:52:43",
                "email": "John.Doe@email.fr",
                "firstname": "John",
                "lang": "fr",
                "lastname": "Doe",
                "phone": "06 38 39 XX XX"
            }
        },
        "title": "Sms de landing page",
        "type": "lost_calls"
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2024-03-04 09:12:08",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 1
    }
}

Update a SMS alert

PUT
PATCH
https://api.magnetis.io
/alerts/sms/{id}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

Alert ID.

Example:
als-06529b90-73e1-4f8d-b654-aa1f8116ab41

Body Parameters

Response Fields

Example request:
curl --request PUT \
    "https://api.magnetis.io/alerts/sms/als-06529b90-73e1-4f8d-b654-aa1f8116ab41" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"additional_recipients\": false,
    \"all_tracked_numbers\": false,
    \"enabled\": null,
    \"landing_page_id\": \"ldp-53470c4d-7721-4490-bd22-237066afd5c5\",
    \"less_than\": 15,
    \"more_than\": 19,
    \"notification_emails\": [
        \"amazingemail@email.com\",
        \"thebestemail@email.com\"
    ],
    \"notification_recipients\": [
        \"rcp-8b514c55-f135-48da-83e4-1a1cd3cccb84\",
        \"rcp-75e932ca-6714-4088-b571-e6047a0dd1c6\"
    ],
    \"numbers\": [
        \"num-50700e9e-879e-480a-859a-1db8301bd712\",
        \"num-87b2e273-29c7-41a9-bd7e-66748d9cdf40\"
    ],
    \"pools\": [
        \"pul-50700e9e-879e-480a-859a-1db8301bd712\",
        \"pul-87b2e273-29c7-41a9-bd7e-66748d9cdf40\"
    ],
    \"send_to\": \"caller\",
    \"sms_template_id\": \"sds-8dc0d51c-bd63-4aaf-ab64-6fb46edb17ac\",
    \"title\": \"Alerte avec Landing Page\",
    \"type\": \"custom_calls\"
}"
Example response:
{
    "data": {
        "id": "als-f3f2849a-e306-4a00-b539-45bc48b95b61",
        "account": {
            "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
            "name": "Immobilier tertiaire"
        },
        "additional_recipients": [],
        "all_tracked_numbers": 1,
        "created_at": "2024-03-07 10:34:09",
        "enabled": 1,
        "landing_page": {
            "id": "8810c59a-c05c-4801-a3e7-c77308296c9c",
            "account": {
                "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
                "name": "Immobilier tertiaire"
            },
            "created_at": "2024-01-01 01:00:00",
            "entity": null,
            "network": null,
            "title": "Ma Landing Page",
            "url": "https://www.mywebsite.fr"
        },
        "less_than": null,
        "more_than": null,
        "notification_emails": [],
        "notification_recipients": [],
        "numbers": [],
        "pools": [],
        "send_to": "caller",
        "sms_template": {
            "id": "sds-3712da26-d91e-4d9a-8545-2a6a4023231b32",
            "account": {
                "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
                "name": "Immobilier tertiaire"
            },
            "created_at": "2024-03-01 14:52:46",
            "entity": null,
            "from": "InfoAppel",
            "network": null,
            "nb_characters": 2121,
            "nb_sms": 2,
            "text": "Nous avons raté votre appel, completer le question ##LIENTRACKEVERSLANDPAGE## pour que nous puissions vous recontacter. A bientôt.",
            "title": "Appel Manqué Appelé",
            "user": {
                "id": "usr-78a51d97-1bd2-467e-b67c-bb683014e84c",
                "created_at": "2024-03-01 14:52:43",
                "email": "John.Doe@email.fr",
                "firstname": "John",
                "lang": "fr",
                "lastname": "Doe",
                "phone": "06 38 39 XX XX"
            }
        },
        "title": "Sms de landing page",
        "type": "lost_calls"
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2024-03-04 09:12:08",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 1
    }
}

Delete a sms alert

DELETE
https://api.magnetis.io
/alerts/sms/{id}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

The id of the alert.

Example:
als-06529b90-73e1-4f8d-b654-aa1f8116ab41

Response Fields

Example request:
curl --request DELETE \
    "https://api.magnetis.io/alerts/sms/als-06529b90-73e1-4f8d-b654-aa1f8116ab41" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [],
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 0
    }
}

Architecture

Organizations


Fetch an organization

GET
https://api.magnetis.io
/organization
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/organization" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "id": "org-206cfd6e-c95e-4aee-9068-164c8539f85a",
    "activity": "Immobilier tertiaire",
    "billing_details": {
        "address": "1 rue de la Mairie",
        "city": "Paris",
        "country": "FRA",
        "billing_email": "comptabilite@mycompany.fr",
        "phone": "0033611223344",
        "siret": "987654321",
        "tva_number": "FR123456789",
        "zipcode": "75001"
    },
    "company": "My company",
    "created_at": "2023-07-25 12:00:00",
    "external_id": "Project ABC",
    "rgpd": 2
}

Update an organization

PUT
PATCH
https://api.magnetis.io
/organization
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Response Fields

Example request:
curl --request PUT \
    "https://api.magnetis.io/organization" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"activity\": \"Automobile\",
    \"external_id\": \"DV-12321\",
    \"rgpd\": 3,
    \"company\": \"Example&Co\",
    \"billing_details\": {
        \"address\": \"691 Impasse Mallet\",
        \"city\": \"Millet-sur-Pires\",
        \"country\": \"FRA\",
        \"billing_email\": \"billing@company.com\",
        \"phone\": \"003393455XXXX\",
        \"siret\": \"123 456 789 00012\",
        \"zipcode\": \"33160\",
        \"tva_number\": \"FR123456789\"
    }
}"
Example response:
{
    "id": "org-206cfd6e-c95e-4aee-9068-164c8539f85a",
    "activity": "Immobilier tertiaire",
    "billing_details": {
        "address": "1 rue de la Mairie",
        "city": "Paris",
        "country": "FRA",
        "billing_email": "comptabilite@mycompany.fr",
        "phone": "0033611223344",
        "siret": "987654321",
        "tva_number": "FR123456789",
        "zipcode": "75001"
    },
    "company": "My company",
    "created_at": "2023-07-25 12:00:00",
    "external_id": "Project ABC",
    "rgpd": 2
}

Get organization architecture

GET
https://api.magnetis.io
/organization/architecture
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/organization/architecture" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 600
                                                                                                                    x-ratelimit-remaining
                                                            : 599
                                                         
{
    "error": "Api key is invalid",
    "data": []
}

Networks


List all networks

GET
https://api.magnetis.io
/networks
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

limit
Optional. Result per page. 250 if not set.
Example:
250
page
Optional. Pagination page. 1 if not set.
Example:
1

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/networks" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": "net-bd05fbcd-4623-4ba5-b1fd-d586198334f7",
            "activity": "Immobilier tertiaire",
            "created_at": "2323-06-27 10:40:00",
            "name": "Réseau Ile de France",
            "parent_network_id": null,
            "rgpd": 3
        },
        {
            "id": "net-47cd1df6-d252-46af-8c18-32da13aa3d33",
            "activity": "Automobile",
            "created_at": "2323-06-27 10:40:00",
            "name": "Réseau Nord Ouest",
            "parent_network_id": null,
            "rgpd": 3
        },
        {
            "id": "net-204958f3-0665-4205-b08d-b3c300c4e9a2",
            "activity": "Construction",
            "created_at": "2323-06-27 10:40:00",
            "name": "Réseau Sud Est",
            "parent_network_id": null,
            "rgpd": 3
        }
    ],
    "links": {
        "first": "https://api.magnetis.io/networks?page=1",
        "last": "https://api.magnetis.io/networks?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://api.magnetis.io/networks",
        "per_page": 250,
        "to": 3,
        "total": 3,
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        }
    }
}

Create a network

POST
https://api.magnetis.io
/networks
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Response Fields

Example request:
curl --request POST \
    "https://api.magnetis.io/networks" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"activity\": \"Automobile\",
    \"parent_network_id\": \"net-XXX\",
    \"name\": \"Point de vente N°1\"
}"
Example response:
{
    "data": {
        "id": "net-bd05fbcd-4623-4ba5-b1fd-d586198334f7",
        "activity": "Immobilier tertiaire",
        "created_at": "2323-06-27 10:40:00",
        "name": "Réseau Ile de France",
        "parent_network_id": null,
        "rgpd": 3
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "network",
            "name": "My network"
        },
        "total": 1
    }
}

Fetch a network

GET
https://api.magnetis.io
/networks/{id}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

slug
string
required

The id of the network.

Example:
net-f3c61104-d94f-4a5f-8fcb-7a63fcc89a6c

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/networks/1" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": "net-bd05fbcd-4623-4ba5-b1fd-d586198334f7",
        "activity": "Immobilier tertiaire",
        "created_at": "2323-06-27 10:40:00",
        "name": "Réseau Ile de France",
        "parent_network_id": null,
        "rgpd": 3
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "network",
            "name": "My network"
        },
        "total": 1
    }
}

Update a network

PUT
PATCH
https://api.magnetis.io
/networks/{id}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

slug
string
required

The id of the network.

Example:
net-f3c61104-d94f-4a5f-8fcb-7a63fcc89a6c

Body Parameters

Response Fields

Example request:
curl --request PUT \
    "https://api.magnetis.io/networks/1" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"activity\": \"Automobile\",
    \"name\": \"Point de vente N°1\"
}"
Example response:
{
    "data": {
        "id": "net-bd05fbcd-4623-4ba5-b1fd-d586198334f7",
        "activity": "Immobilier tertiaire",
        "created_at": "2323-06-27 10:40:00",
        "name": "Réseau Ile de France",
        "parent_network_id": null,
        "rgpd": 3
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "network",
            "name": "My network"
        },
        "total": 1
    }
}

Remove a network

DELETE
https://api.magnetis.io
/networks/{id}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

slug
string
required

The id of the network.

Example:
net-f3c61104-d94f-4a5f-8fcb-7a63fcc89a6c

Response Fields

Example request:
curl --request DELETE \
    "https://api.magnetis.io/networks/1" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": "net-bd05fbcd-4623-4ba5-b1fd-d586198334f7",
        "activity": "Immobilier tertiaire",
        "created_at": "2323-06-27 10:40:00",
        "name": "Réseau Ile de France",
        "parent_network_id": null,
        "rgpd": 3
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "network",
            "name": "My network"
        },
        "total": 1
    }
}

List all networks children of a network

GET
https://api.magnetis.io
/networks/{network}/networks
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

slug
string
required

The id of the network.

Example:
net-f3c61104-d94f-4a5f-8fcb-7a63fcc89a6c

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/networks/1/networks" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": "net-bd05fbcd-4623-4ba5-b1fd-d586198334f7",
            "activity": "Immobilier tertiaire",
            "created_at": "2323-06-27 10:40:00",
            "name": "Réseau Ile de France",
            "parent_network_id": null,
            "rgpd": 3
        },
        {
            "id": "net-47cd1df6-d252-46af-8c18-32da13aa3d33",
            "activity": "Automobile",
            "created_at": "2323-06-27 10:40:00",
            "name": "Réseau Nord Ouest",
            "parent_network_id": null,
            "rgpd": 3
        },
        {
            "id": "net-204958f3-0665-4205-b08d-b3c300c4e9a2",
            "activity": "Construction",
            "created_at": "2323-06-27 10:40:00",
            "name": "Réseau Sud Est",
            "parent_network_id": null,
            "rgpd": 3
        }
    ],
    "links": {
        "first": "https://api.magnetis.io/networks?page=1",
        "last": "https://api.magnetis.io/networks?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://api.magnetis.io/networks",
        "per_page": 250,
        "to": 3,
        "total": 3,
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        }
    }
}

Accounts


List all accounts

GET
https://api.magnetis.io
/accounts
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

limit
Optional. Result per page. 250 if not set.
Example:
250
page
Optional. Pagination page. 1 if not set.
Example:
1

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/accounts" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
            "activity": "Immobilier tertiaire",
            "address": {
                "zipcode": "75015",
                "city": "Paris",
                "country": "FRA"
            },
            "created_at": "2023-07-20 13:58:30",
            "name": "Immo Paris",
            "parent_network_id": "net-bd05fbcd-4623-4ba5-b1fd-d586198334f7",
            "rgpd": 1
        },
        {
            "id": "acc-f702dcb6-87cf-4bc4-8632-560c43aec1a4",
            "activity": "Automobile",
            "address": {
                "zipcode": "33000",
                "city": "Bordeaux",
                "country": "FRA"
            },
            "created_at": "2023-07-14 11:52:27",
            "name": "Auto Bordeaux",
            "parent_network_id": null,
            "rgpd": 2
        },
        {
            "id": "acc-250ce1bd-237d-4e2d-aa17-51293760a801",
            "activity": "Construction",
            "address": {
                "zipcode": "69000",
                "city": "Lyon",
                "country": "FRA"
            },
            "created_at": "2023-06-25 07:34:12",
            "name": "Artisan Lyon",
            "parent_network_id": null,
            "rgpd": 3
        }
    ],
    "links": {
        "first": "https://api.magnetis.io/accounts?page=1",
        "last": "https://api.magnetis.io/accounts?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://api.magnetis.io/accounts",
        "per_page": 250,
        "to": 3,
        "total": 3,
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        }
    }
}

Create an account

POST
https://api.magnetis.io
/accounts
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Response Fields

Example request:
curl --request POST \
    "https://api.magnetis.io/accounts" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"activity\": \"Automobile\",
    \"city\": \"Paris\",
    \"country\": \"FRA\",
    \"name\": \"My account\",
    \"parent_network_id\": \"net-XXX\",
    \"zipcode\": \"75000\"
}"
Example response:
{
    "data": {
        "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
        "activity": "Immobilier tertiaire",
        "address": {
            "zipcode": "75015",
            "city": "Paris",
            "country": "FRA"
        },
        "created_at": "2023-07-20 13:58:30",
        "name": "Immo Paris",
        "parent_network_id": null,
        "rgpd": 1
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 1
    }
}

Fetch an account

GET
https://api.magnetis.io
/accounts/{id}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

slug
string
required

The ID of the account.

Example:
acc-6e64b651-026a-46de-ab3e-944a193945a9

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/accounts/1" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
        "activity": "Immobilier tertiaire",
        "address": {
            "zipcode": "75015",
            "city": "Paris",
            "country": "FRA"
        },
        "created_at": "2023-07-20 13:58:30",
        "name": "Immo Paris",
        "parent_network_id": null,
        "rgpd": 1
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 1
    }
}

Update an account

PUT
PATCH
https://api.magnetis.io
/accounts/{id}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

slug
string
required

The id of the account.

Example:
acc-6e64b651-026a-46de-ab3e-944a193945a9

Body Parameters

Response Fields

Example request:
curl --request PUT \
    "https://api.magnetis.io/accounts/1" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"activity\": \"Automobile\",
    \"city\": \"Paris\",
    \"country\": \"FRA\",
    \"name\": \"My account\",
    \"parent_network_id\": \"net-XXX\",
    \"rgpd\": \"2\",
    \"zipcode\": \"75000\"
}"
Example response:
{
    "data": {
        "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
        "activity": "Immobilier tertiaire",
        "address": {
            "zipcode": "75015",
            "city": "Paris",
            "country": "FRA"
        },
        "created_at": "2023-07-20 13:58:30",
        "name": "Immo Paris",
        "parent_network_id": null,
        "rgpd": 1
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 1
    }
}

Delete an account

DELETE
https://api.magnetis.io
/accounts/{id}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

slug
string
required

The id of the account.

Example:
acc-6e64b651-026a-46de-ab3e-944a193945a9

Response Fields

Example request:
curl --request DELETE \
    "https://api.magnetis.io/accounts/1" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
        "activity": "Immobilier tertiaire",
        "address": {
            "zipcode": "75015",
            "city": "Paris",
            "country": "FRA"
        },
        "created_at": "2023-07-20 13:58:30",
        "name": "Immo Paris",
        "parent_network_id": null,
        "rgpd": 1
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 1
    }
}

Authentication

Get API key informations

GET
https://api.magnetis.io
/auth
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/auth" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
        "created_at": "2023-07-25 12:00:00",
        "expiration": null,
        "level": "account",
        "name": "My account"
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 1
    }
}

Calls

List all calls

GET
https://api.magnetis.io
/calls
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

from
Optional. From date. 7 days ago if not set.
Example:
20230601000000
limit
Optional. Result per page. 250 if not set.
Example:
250
page
Optional. Pagination page. 1 if not set.
Example:
1
number_id
Optional. Filter by number ID.
Example:
num-XXX
to
Optional. To date. Now if not set.
Example:
20230607235959
calling_number
Optional. Calling number filter at international format.
Example:
0033612345678
actions
Optional. Allows you to display post-call actions when equals to 1.
Example:
1

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/calls" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": "call-0c5ac87f-6d8b-4e94-9ce2-f4773bced2f5",
            "account": {
                "id": "acc-efd1bbeb-afbb-4895-a6d5-40a13558af49",
                "name": "My account"
            },
            "calling_country": "FRA",
            "calling_number": "0033612345678",
            "calling_type": "mobile",
            "channel_name": "Google Ads",
            "channel_type": "googleads",
            "date": "2023-08-30 13:57:30",
            "duration": 43,
            "end_date": "2023-08-30 13:58:13",
            "end_status": "completed",
            "events": [
                {
                    "date": "2023-08-30 13:57:30",
                    "name": "call:in",
                    "value": null
                },
                {
                    "date": "2023-08-30 13:57:31",
                    "name": "call:out",
                    "value": "0033687654321"
                },
                {
                    "date": "2023-08-30 13:57:33",
                    "name": "call:ringing",
                    "value": "0033687654321"
                },
                {
                    "date": "2023-08-30 13:57:48",
                    "name": "call:answered",
                    "value": "0033687654321"
                },
                {
                    "date": "2023-08-30 13:58:13",
                    "name": "call:completed",
                    "value": "no-answer"
                }
            ],
            "firsttime_caller": true,
            "flow_status": "completed",
            "google_ads_extension": null,
            "missed": false,
            "number_id": "num-18dd0fdb-7f21-4999-9335-a5d50d8c716e",
            "pool_id": "pul-c8c7912c-5e3e-4b19-8769-4daadea66dea",
            "recipient_number": "0033687654321",
            "tracked_country": "FRA",
            "tracked_number": "0033412345678",
            "tracked_type": "geographic",
            "voice_duration": 43,
            "visitor": {
                "condition_name": "Google Ads",
                "condition_type": "google_ads",
                "custom_cookies": [],
                "custom_local_storage": [],
                "custom_params": [],
                "custom_variables": [],
                "ga": "GA1.1.12345678.87654321",
                "gclid": "EAIaIQobChER4_LZnaeJ4gIV3EdFFh2raA5aEAAYAiAAEgKyCF3_BwE",
                "gbraid": null,
                "msclkid": null,
                "utm": [
                    {
                        "key": "utm_source",
                        "value": "googleads"
                    }
                ],
                "valuetrack": [],
                "wbraid": null,
                "3rdparty": []
            }
        },
        {
            "id": "call-a9dec6da-1fdf-4e33-ba0e-e7c8d20e1edb",
            "account": {
                "id": "acc-efd1bbeb-afbb-4895-a6d5-40a13558af49",
                "name": "My account"
            },
            "calling_country": "FRA",
            "calling_number": "0033911774499",
            "calling_type": "geographic",
            "channel_name": "SEO",
            "channel_type": "seo",
            "date": "2023-08-30 10:05:53",
            "duration": 302,
            "end_date": "2023-08-30 10:10:55",
            "end_status": "completed",
            "events": [
                {
                    "date": "2023-08-30 10:05:53",
                    "name": "call:in",
                    "value": null
                },
                {
                    "date": "2023-08-30 10:05:54",
                    "name": "call:out",
                    "value": "0033687654321"
                },
                {
                    "date": "2023-08-30 10:05:55",
                    "name": "call:ringing",
                    "value": "0033687654321"
                },
                {
                    "date": "2023-08-30 10:06:03",
                    "name": "call:answered",
                    "value": "0033687654321"
                },
                {
                    "date": "2023-08-30 10:10:55",
                    "name": "call:completed",
                    "value": "completed"
                }
            ],
            "firsttime_caller": false,
            "flow_status": "completed",
            "google_ads_extension": null,
            "missed": false,
            "number_id": "num-583a97ac-eeef-4d18-bede-56c67e29c1cb",
            "pool_id": null,
            "recipient_number": "0033687654321",
            "tracked_country": "FRA",
            "tracked_number": "0033488554422",
            "tracked_type": "geographic",
            "voice_duration": 292,
            "visitor": null
        },
        {
            "id": "call-b7831876-641f-43c3-b70f-5f51a2750a14",
            "account": {
                "id": "acc-efd1bbeb-afbb-4895-a6d5-40a13558af49",
                "name": "My account"
            },
            "calling_country": "FRA",
            "calling_number": "0033643215678",
            "calling_type": "mobile",
            "channel_name": "Extensions Google Ads",
            "channel_type": "googleadsextension",
            "date": "2023-08-30 09:30:05",
            "duration": 5,
            "end_date": "2023-08-30 09:30:10",
            "end_status": "no-answer",
            "events": [
                {
                    "date": "2023-08-30 09:30:05",
                    "name": "call:in",
                    "value": null
                },
                {
                    "date": "2023-08-30 09:30:06",
                    "name": "call:out",
                    "value": "0033687654321"
                },
                {
                    "date": "2023-08-30 09:30:07",
                    "name": "call:ringing",
                    "value": "0033687654321"
                },
                {
                    "date": "2023-08-30 09:30:10",
                    "name": "call:completed",
                    "value": "completed"
                }
            ],
            "firsttime_caller": true,
            "flow_status": "completed",
            "google_ads_extension": {
                "customer_id": "123-456-7890",
                "customer_name": "My Google Ads account",
                "campaign_id": "123456789012",
                "campaign_name": "My campaign",
                "ad_group_id": "098765432109",
                "ad_group_name": "My ad group"
            },
            "missed": true,
            "number_id": "num-0c1aa069-896b-44b1-83c9-a41c3ea6daa9",
            "pool_id": null,
            "recipient_number": "0033644332211",
            "tracked_country": "FRA",
            "tracked_number": "0033411223344",
            "tracked_type": "geographic",
            "voice_duration": 5,
            "visitor": null
        }
    ],
    "links": {
        "first": "https://api.magnetis.io/calls?page=1",
        "last": "https://api.magnetis.io/calls?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://api.magnetis.io/calls",
        "per_page": 500,
        "to": 3,
        "total": 3,
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        }
    }
}

Fetch a call

GET
https://api.magnetis.io
/calls/{id}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

The ID of the call.

Example:
call-50e4003c-e072-4b3d-b0db-ef8dd9a2949a
actions
Optional. Allows you to display post-call actions when equals to 1.
Example:
1

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/calls/call-50e4003c-e072-4b3d-b0db-ef8dd9a2949a" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": "call-0c5ac87f-6d8b-4e94-9ce2-f4773bced2f5",
        "account": {
            "id": "acc-efd1bbeb-afbb-4895-a6d5-40a13558af49",
            "name": "My account"
        },
        "calling_country": "FRA",
        "calling_number": "0033612345678",
        "calling_type": "mobile",
        "channel_name": "Google Ads",
        "channel_type": "googleads",
        "date": "2023-08-30 13:57:30",
        "duration": 43,
        "end_date": "2023-08-30 13:58:13",
        "end_status": "completed",
        "events": [
            {
                "date": "2023-08-30 13:57:30",
                "name": "call:in",
                "value": null
            },
            {
                "date": "2023-08-30 13:57:31",
                "name": "call:out",
                "value": "0033687654321"
            },
            {
                "date": "2023-08-30 13:57:33",
                "name": "call:ringing",
                "value": "0033687654321"
            },
            {
                "date": "2023-08-30 13:57:48",
                "name": "call:answered",
                "value": "0033687654321"
            },
            {
                "date": "2023-08-30 13:58:13",
                "name": "call:completed",
                "value": "no-answer"
            }
        ],
        "firsttime_caller": true,
        "flow_status": "completed",
        "google_ads_extension": null,
        "missed": false,
        "number_id": "num-18dd0fdb-7f21-4999-9335-a5d50d8c716e",
        "pool_id": "pul-c8c7912c-5e3e-4b19-8769-4daadea66dea",
        "recipient_number": "0033687654321",
        "tracked_country": "FRA",
        "tracked_number": "0033412345678",
        "tracked_type": "geographic",
        "voice_duration": 43,
        "visitor": {
            "condition_name": "Google Ads",
            "condition_type": "google_ads",
            "custom_cookies": [],
            "custom_local_storage": [],
            "custom_params": [],
            "custom_variables": [],
            "ga": "GA1.1.12345678.87654321",
            "gclid": "EAIaIQobChER4_LZnaeJ4gIV3EdFFh2raA5aEAAYAiAAEgKyCF3_BwE",
            "gbraid": null,
            "msclkid": null,
            "utm": [
                {
                    "key": "utm_source",
                    "value": "googleads"
                }
            ],
            "valuetrack": [],
            "wbraid": null,
            "3rdparty": []
        }
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 1
    }
}

Upload conversion for Google Ads Extension call

POST
https://api.magnetis.io
/calls/{id}/extension_conversion
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

The ID of the call.

Example:
call-50e4003c-e072-4b3d-b0db-ef8dd9a2949a

Body Parameters

Response Fields

Example request:
curl --request POST \
    "https://api.magnetis.io/calls/call-50e4003c-e072-4b3d-b0db-ef8dd9a2949a/extension_conversion" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"conversion_action\": \"Rendez-vous qualifié\",
    \"value\": \"0\"
}"
Example response:
{
    "error": "Confirmation message",
    "data": []
}

Update conversion value for Google Ads visitor call

PUT
https://api.magnetis.io
/calls/{id}/visitor_conversion
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

The ID of the call.

Example:
call-50e4003c-e072-4b3d-b0db-ef8dd9a2949a

Body Parameters

Response Fields

Example request:
curl --request PUT \
    "https://api.magnetis.io/calls/call-50e4003c-e072-4b3d-b0db-ef8dd9a2949a/visitor_conversion" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"value\": \"0\"
}"
Example response:
{
    "error": "Confirmation message",
    "data": []
}

Delete conversion for Google Ads visitor call

DELETE
https://api.magnetis.io
/calls/{id}/visitor_conversion
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

The ID of the call.

Example:
call-50e4003c-e072-4b3d-b0db-ef8dd9a2949a

Response Fields

Example request:
curl --request DELETE \
    "https://api.magnetis.io/calls/call-50e4003c-e072-4b3d-b0db-ef8dd9a2949a/visitor_conversion" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "error": "Confirmation message",
    "data": []
}

Email-tracking

Emails


List all received emails

GET
https://api.magnetis.io
/emails
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

from
Optional. From date. 7 days ago if not set.
Example:
20230601000000
limit
Optional. Result per page. 250 if not set.
Example:
250
page
Optional. Pagination page. 1 if not set.
Example:
1
to
Optional. To date. Now if not set.
Example:
20230607235959
type
Optional. Email filter: match, unmatch, all. Match if not set.
Example:
match

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/emails" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": "etm-4908be34-1489-4806-85f6-11bf12ea13ce",
            "account": {
                "id": "acc-250ce1bd-237d-4e2d-aa17-51293760a801",
                "name": "Artisan Lyon"
            },
            "channel_name": "LeBonCoin",
            "channel_type": "leboncoin",
            "date": "2023-09-25 14:50:12",
            "from_email": "jane.doe@gmail.com",
            "from_name": "Jane Doe",
            "is_spam": false,
            "lead": {
                "id": "lead-9c6187a3-9865-418d-be80-e45d5990f039",
                "call_id": null,
                "created_at": "2023-09-25 14:50:12",
                "email_id": "etm-4908be34-1489-4806-85f6-11bf12ea13ce",
                "fields": {
                    "firstname": "Jane",
                    "lastname": "Doe",
                    "phone": null,
                    "email": "jane.doe@gmail.com",
                    "zipcode": null
                },
                "landing_page": {
                    "title": null,
                    "url": null
                },
                "source": "email"
            },
            "subject": "Nouveau message sur votre annonce",
            "tracked_email": "acc.99999.track@mgtmail.fr",
            "to": "entreprise@monemail.com"
        },
        {
            "id": "etm-1775b79c-95b0-41f3-844a-3bb2437b25d1",
            "account": {
                "id": "acc-66db2b07-073e-40ca-ab82-cc9b7e652bd0",
                "name": "Artisan Lille"
            },
            "channel_name": "Se Loger",
            "channel_type": "seloger",
            "date": "2023-09-25 14:50:12",
            "from_email": "john@gmail.com",
            "from_name": "John Doe",
            "is_spam": false,
            "lead": null,
            "subject": "Nouveau prospect",
            "tracked_email": "acc.99998.track@mgtmail.fr",
            "to": "entreprise@monemail.com"
        }
    ],
    "links": {
        "first": "https://api.magnetis.io/emails?page=1",
        "last": "https://api.magnetis.io/emails?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://api.magnetis.io/emails",
        "per_page": 250,
        "to": 2,
        "total": 2,
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        }
    }
}

Fetch a received email

GET
https://api.magnetis.io
/emails/{id}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

slug
string
required

The id of the email.

Example:
etm-49a6306b-64c6-4c48-89a1-5ea572231fc3

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/emails/1" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": "etm-4908be34-1489-4806-85f6-11bf12ea13ce",
        "account": {
            "id": "acc-250ce1bd-237d-4e2d-aa17-51293760a801",
            "name": "Artisan Lyon"
        },
        "channel_name": "LeBonCoin",
        "channel_type": "leboncoin",
        "date": "2023-09-25 14:50:12",
        "from_email": "jane.doe@gmail.com",
        "from_name": "Jane Doe",
        "is_spam": false,
        "lead": {
            "id": "lead-9c6187a3-9865-418d-be80-e45d5990f039",
            "call_id": null,
            "created_at": "2023-09-25 14:50:12",
            "email_id": "etm-4908be34-1489-4806-85f6-11bf12ea13ce",
            "fields": {
                "firstname": "Jane",
                "lastname": "Doe",
                "phone": null,
                "email": "jane.doe@gmail.com",
                "zipcode": null
            },
            "landing_page": {
                "title": null,
                "url": null
            },
            "source": "email"
        },
        "subject": "Nouveau message sur votre annonce",
        "tracked_email": "acc.99999.track@mgtmail.fr",
        "to": "entreprise@monemail.com"
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 3
    }
}

Leads

List all leads

GET
https://api.magnetis.io
/leads
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

account_id
Optional. Filter by account ID.
Example:
acc-XXX
limit
Optional. Result per page. 250 if not set.
Example:
250
page
Optional. Pagination page. 1 if not set.
Example:
1

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/leads" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": "lead-8204460e-82fb-4a18-ac0a-fb3f34231372",
            "account": {
                "id": "acc-250ce1bd-237d-4e2d-aa17-51293760a801",
                "name": "Artisan Lyon"
            },
            "call_id": "call-7384f936-b36f-4305-9350-92e3ed67531b",
            "created_at": "2023-09-25 14:50:12",
            "email_id": null,
            "fields": {
                "firstname": "John",
                "lastname": "Doe",
                "phone": "0033647XXXXXX",
                "email": "john.doe@example.com",
                "zipcode": null
            },
            "landing_page": {
                "title": "Ma landing page",
                "url": "https://www.example.com"
            },
            "outgoing": null,
            "source": "call"
        },
        {
            "id": "lead-9c6187a3-9865-418d-be80-e45d5990f039",
            "account": {
                "id": "acc-250ce1bd-237d-4e2d-aa17-51293760a801",
                "name": "Artisan Lyon"
            },
            "call_id": null,
            "created_at": "2023-09-25 14:50:12",
            "email_id": "etm-4908be34-1489-4806-85f6-11bf12ea13ce",
            "fields": {
                "firstname": "Jane",
                "lastname": "Doe",
                "phone": "0033652XXXXXX",
                "email": null,
                "zipcode": null
            },
            "landing_page": {
                "title": null,
                "url": null
            },
            "outgoing": {
                "assignment_date": "2023-09-10 10:00:00",
                "start_date": "2023-09-10 10:00:00",
                "limit_date": "2023-09-10 10:00:00"
            },
            "source": "email"
        }
    ],
    "links": {
        "first": "https://api.magnetis.io/leads?page=1",
        "last": "https://api.magnetis.io/leads?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://api.magnetis.io/leads",
        "per_page": 250,
        "to": 2,
        "total": 2,
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        }
    }
}

Create a lead

POST
https://api.magnetis.io
/leads
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Response Fields

Example request:
curl --request POST \
    "https://api.magnetis.io/leads" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"account_id\": \"acc-6e64b651-026a-46de-ab3e-944a193945a9\",
    \"fields\": [
        {
            \"label\": \"Prénom\",
            \"value\": \"François\"
        }
    ]
}"
Example response:
{
    "data": {
        "id": "lead-9c6187a3-9865-418d-be80-e45d5990f039",
        "account": {
            "id": "acc-250ce1bd-237d-4e2d-aa17-51293760a801",
            "name": "Artisan Lyon"
        },
        "created_at": "2023-09-25 14:50:12",
        "fields": {
            "firstname": "Jane",
            "lastname": "Doe",
            "phone": "0033652XXXXXX",
            "zipcode": null
        },
        "landing_page": {
            "title": null,
            "url": null
        },
        "outgoing": {
            "assignment_date": "2023-09-10 10:00:00",
            "start_date": "2023-09-10 10:00:00",
            "limit_date": "2023-09-10 10:00:00"
        },
        "source": "api"
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 3
    }
}

Fetch a lead

GET
https://api.magnetis.io
/leads/{slug}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

slug
string
required

The id of the lead

Example:
lead-6e64b651-026a-46de-ab3e-944a193945a9

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/leads/lead-6e64b651-026a-46de-ab3e-944a193945a9" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": "lead-9c6187a3-9865-418d-be80-e45d5990f039",
        "account": {
            "id": "acc-250ce1bd-237d-4e2d-aa17-51293760a801",
            "name": "Artisan Lyon"
        },
        "created_at": "2023-09-25 14:50:12",
        "fields": {
            "firstname": "Jane",
            "lastname": "Doe",
            "phone": "0033652XXXXXX",
            "zipcode": null
        },
        "landing_page": {
            "title": null,
            "url": null
        },
        "outgoing": {
            "assignment_date": "2023-09-10 10:00:00",
            "start_date": "2023-09-10 10:00:00",
            "limit_date": "2023-09-10 10:00:00"
        },
        "source": "api"
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 3
    }
}

Update a lead

PUT
PATCH
https://api.magnetis.io
/leads/{slug}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

slug
string
required

The id of the lead

Example:
lead-6e64b651-026a-46de-ab3e-944a193945a9

Body Parameters

Response Fields

Example request:
curl --request PUT \
    "https://api.magnetis.io/leads/lead-6e64b651-026a-46de-ab3e-944a193945a9" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"fields\": [
        {
            \"label\": \"Prénom\",
            \"value\": \"François\"
        }
    ]
}"
Example response:
{
    "data": {
        "id": "lead-9c6187a3-9865-418d-be80-e45d5990f039",
        "account": {
            "id": "acc-250ce1bd-237d-4e2d-aa17-51293760a801",
            "name": "Artisan Lyon"
        },
        "created_at": "2023-09-25 14:50:12",
        "fields": {
            "firstname": "Jane",
            "lastname": "Doe",
            "phone": "0033652XXXXXX",
            "zipcode": null
        },
        "landing_page": {
            "title": null,
            "url": null
        },
        "outgoing": {
            "assignment_date": "2023-09-10 10:00:00",
            "start_date": "2023-09-10 10:00:00",
            "limit_date": "2023-09-10 10:00:00"
        },
        "source": "api"
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 3
    }
}

Delete a lead

DELETE
https://api.magnetis.io
/leads/{slug}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

slug
string
required

The id of the lead

Example:
lead-6e64b651-026a-46de-ab3e-944a193945a9

Response Fields

Example request:
curl --request DELETE \
    "https://api.magnetis.io/leads/lead-6e64b651-026a-46de-ab3e-944a193945a9" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [],
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 0
    }
}

Monitoring

Daily monitoring


List all daily monitorings

GET
https://api.magnetis.io
/monitorings/daily
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

account_id
Optional. Filter by account ID.
Example:
acc-XXX
limit
Optional. Result per page. 250 if not set.
Example:
250
page
Optional. Pagination page. 1 if not set.
Example:
1

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/monitorings/daily" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": "mdl-67bc8021-08f8-44a7-81e0-5002724ed3e7",
            "account": {
                "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
                "name": "Immobilier tertiaire"
            },
            "created_at": "2024-01-02 08:09:53",
            "enabled": true,
            "last_alert": "2024-02-29 13:44:21",
            "rate": "70",
            "recipients": [
                "example@email.fr"
            ]
        }
    ],
    "links": {
        "first": "https://api.magnetis.io/monitorings/daily?page=1",
        "last": "https://api.magnetis.io/monitorings/daily?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://api.magnetis.io/monitorings/daily",
        "per_page": 250,
        "to": 1,
        "total": 1,
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        }
    }
}

Fetch a daily monitoring

GET
https://api.magnetis.io
/monitorings/daily/{account_id}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

account_id
Account ID
required
Example:
acc-67bc8021-08f8-44a7-81e0-5002724ed3e7

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/monitorings/daily/acc-67bc8021-08f8-44a7-81e0-5002724ed3e7" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:

Update a daily monitoring

PUT
https://api.magnetis.io
/monitorings/daily/{account_id}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

account_id
Account ID
required
Example:
acc-67bc8021-08f8-44a7-81e0-5002724ed3e7

Body Parameters

Response Fields

Example request:
curl --request PUT \
    "https://api.magnetis.io/monitorings/daily/acc-67bc8021-08f8-44a7-81e0-5002724ed3e7" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"rate\": 9,
    \"recipients\": [
        \"ipsam\"
    ],
    \"enabled\": true
}"
Example response:

Recurring monitoring


List all recurring monitorings

GET
https://api.magnetis.io
/monitorings/recurring
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

account_id
Optional. Filter by account ID.
Example:
acc-XXX
limit
Optional. Result per page. 250 if not set.
Example:
250
page
Optional. Pagination page. 1 if not set.
Example:
1

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/monitorings/recurring" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": "mrr-6d027ee3-4cff-43a0-84be-1dbc3d7559e5",
            "account": {
                "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
                "name": "Immobilier tertiaire"
            },
            "created_at": "2024-01-02 08:09:53",
            "enabled": true,
            "last_alert": "2024-02-29 13:44:21",
            "level": "10",
            "recipients": [
                "example@email.fr"
            ]
        }
    ],
    "links": {
        "first": "https://api.magnetis.io/monitorings/recurring?page=1",
        "last": "https://api.magnetis.io/monitorings/recurring?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://api.magnetis.io/monitorings/recurring",
        "per_page": 250,
        "to": 1,
        "total": 1,
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        }
    }
}

Fetch a recurring monitoring

GET
https://api.magnetis.io
/monitorings/recurring/{account_id}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

account_id
Account ID
required
Example:
acc-6d027ee3-4cff-43a0-84be-1dbc3d7559e5

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/monitorings/recurring/acc-6d027ee3-4cff-43a0-84be-1dbc3d7559e5" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:

Update a recurring monitoring

PUT
https://api.magnetis.io
/monitorings/recurring/{account_id}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

account_id
Account ID
required
Example:
acc-6d027ee3-4cff-43a0-84be-1dbc3d7559e5

Body Parameters

Response Fields

Example request:
curl --request PUT \
    "https://api.magnetis.io/monitorings/recurring/acc-6d027ee3-4cff-43a0-84be-1dbc3d7559e5" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"level\": 11,
    \"recipients\": \"laborum\",
    \"enabled\": true,
    \"mailees\": [
        \"molestiae\"
    ]
}"
Example response:

Recipient monitoring


Fetch the recipient monitoring

GET
https://api.magnetis.io
/monitorings/recipient
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/monitorings/recipient" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": "mrp-2e25425a-26b2-455e-a51b-0693af0f3081",
        "organization_id": "org-6d0aff3d-3141-45bb-8b2b-2d6e2d8dc18e",
        "created_at": "2024-01-02 08:09:53",
        "enabled": false,
        "last_alert": "2024-02-29 13:44:21",
        "level": "5",
        "recipients": [
            "example@email.fr"
        ]
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My Account"
        },
        "total": 1
    }
}

Update the recipient monitoring

PUT
https://api.magnetis.io
/monitorings/recipient
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Response Fields

Example request:
curl --request PUT \
    "https://api.magnetis.io/monitorings/recipient" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"level\": 2,
    \"recipients\": [
        \"culpa\"
    ],
    \"enabled\": true
}"
Example response:
{
    "data": {
        "id": "mrp-2e25425a-26b2-455e-a51b-0693af0f3081",
        "organization_id": "org-6d0aff3d-3141-45bb-8b2b-2d6e2d8dc18e",
        "created_at": "2024-01-02 08:09:53",
        "enabled": false,
        "last_alert": "2024-02-29 13:44:21",
        "level": "5",
        "recipients": [
            "example@email.fr"
        ]
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My Account"
        },
        "total": 1
    }
}

Numbers

List all tracked numbers

GET
https://api.magnetis.io
/numbers
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

account_id
Optional. Filter by account ID.
Example:
acc-XXX
limit
Optional. Result per page. 250 if not set.
Example:
250
page
Optional. Pagination page. 1 if not set.
Example:
1

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/numbers" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": "num-a81cf765-0e48-4797-b315-f702c783996e",
            "account": {
                "id": "acc-f702dcb6-87cf-4bc4-8632-560c43aec1a4",
                "name": "Auto Bordeaux"
            },
            "channel_name": "Google Ads",
            "channel_type": "googleads",
            "country": "FRA",
            "created_at": "2023-07-14 13:52:27",
            "functionalities": {
                "recording": {
                    "deactivation": 1,
                    "terms": "custom",
                    "terms_audio": "sda-e66b21e0-2064-4175-8fa2-2f7a60e64da4"
                },
                "whisper": {
                    "audio": "sda-ef617d12-528a-40fe-a997-da4cda4e4ba7"
                }
            },
            "is_premium": false,
            "number": "0033522334455",
            "recipient": {
                "id": "rcp-3921328c-5966-4df9-a9a9-5f2a8f383e3a",
                "country": "FRA",
                "created_at": "2023-07-14 13:47:21",
                "name": "Concession Bordeaux",
                "number": "0033698765432",
                "type": "mobile"
            },
            "type": "geographic"
        },
        {
            "id": "num-cdea62a0-05f3-4183-b285-697458cadb9e",
            "account": {
                "id": "acc-f702dcb6-87cf-4bc4-8632-560c43aec1a4",
                "name": "Auto Bordeaux"
            },
            "channel_name": "SEO",
            "channel_type": "seo",
            "country": "FRA",
            "created_at": "2023-07-14 13:52:27",
            "functionalities": {
                "recording": null,
                "whisper": null
            },
            "is_premium": false,
            "number": "0033555443322",
            "recipient": {
                "id": "rcp-3921328c-5966-4df9-a9a9-5f2a8f383e3a",
                "country": "FRA",
                "created_at": "2023-07-14 13:47:21",
                "name": "Concession Bordeaux",
                "number": "0033698765432",
                "type": "mobile"
            },
            "type": "geographic"
        },
        {
            "id": "num-e6075fb2-172a-4acf-bc49-6076bbb0c44f",
            "account": {
                "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
                "name": "Immo Paris"
            },
            "channel_name": "Site Internet",
            "channel_type": "website",
            "country": "FRA",
            "created_at": "2023-07-21 13:58:30",
            "functionalities": {
                "recording": null,
                "whisper": null
            },
            "is_premium": false,
            "number": "0033199887766",
            "recipient": {
                "id": "rcp-b7958038-063d-4c75-b7ec-3baea00c8444",
                "country": "FRA",
                "created_at": "2023-07-21 12:54:07",
                "name": "Agence Paris",
                "number": "0033166778899",
                "type": "geographic"
            },
            "type": "geographic"
        }
    ],
    "links": {
        "first": "https://api.magnetis.io/numbers?page=1",
        "last": "https://api.magnetis.io/numbers?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://api.magnetis.io/numbers",
        "per_page": 250,
        "to": 3,
        "total": 3,
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        }
    }
}

Create a tracked number

POST
https://api.magnetis.io
/numbers
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Response Fields

Example request:
curl --request POST \
    "https://api.magnetis.io/numbers" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"account_id\": \"acc-XXX\",
    \"area_code\": \"00339\",
    \"channel_name\": \"My website\",
    \"channel_type\": \"website\",
    \"country\": \"FRA\",
    \"recipient_id\": \"rec-XXX\",
    \"recording\": \"dicta\"
}"
Example response:
{
    "data": {
        "id": "num-a81cf765-0e48-4797-b315-f702c783996e",
        "account": {
            "id": "acc-f702dcb6-87cf-4bc4-8632-560c43aec1a4",
            "name": "Auto Bordeaux"
        },
        "channel_name": "Google Ads",
        "channel_type": "googleads",
        "country": "FRA",
        "created_at": "2023-07-14 13:52:27",
        "functionalities": {
            "recording": {
                "deactivation": 1,
                "terms": "custom",
                "terms_audio": "sda-e66b21e0-2064-4175-8fa2-2f7a60e64da4"
            },
            "whisper": {
                "audio": "sda-ef617d12-528a-40fe-a997-da4cda4e4ba7"
            }
        },
        "is_premium": false,
        "number": "0033522334455",
        "recipient": {
            "id": "rcp-3921328c-5966-4df9-a9a9-5f2a8f383e3a",
            "country": "FRA",
            "created_at": "2023-07-14 13:47:21",
            "name": "Concession Bordeaux",
            "number": "0033698765432",
            "type": "mobile"
        },
        "type": "geographic"
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 1
    }
}

Fetch a tracked number

GET
https://api.magnetis.io
/numbers/{id}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

Required. The ID of the call.

Example:
num-50700e9e-879e-480a-859a-1db8301bd712

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/numbers/num-50700e9e-879e-480a-859a-1db8301bd712" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": "num-a81cf765-0e48-4797-b315-f702c783996e",
        "account": {
            "id": "acc-f702dcb6-87cf-4bc4-8632-560c43aec1a4",
            "name": "Auto Bordeaux"
        },
        "channel_name": "Google Ads",
        "channel_type": "googleads",
        "country": "FRA",
        "created_at": "2023-07-14 13:52:27",
        "functionalities": {
            "recording": {
                "deactivation": 1,
                "terms": "custom",
                "terms_audio": "sda-e66b21e0-2064-4175-8fa2-2f7a60e64da4"
            },
            "whisper": {
                "audio": "sda-ef617d12-528a-40fe-a997-da4cda4e4ba7"
            }
        },
        "is_premium": false,
        "number": "0033522334455",
        "recipient": {
            "id": "rcp-3921328c-5966-4df9-a9a9-5f2a8f383e3a",
            "country": "FRA",
            "created_at": "2023-07-14 13:47:21",
            "name": "Concession Bordeaux",
            "number": "0033698765432",
            "type": "mobile"
        },
        "type": "geographic"
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 1
    }
}

Update a tracked number

PUT
PATCH
https://api.magnetis.io
/numbers/{slug}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

The id of the number.

Example:
num-50700e9e-879e-480a-859a-1db8301bd712

Body Parameters

Response Fields

Example request:
curl --request PUT \
    "https://api.magnetis.io/numbers/1" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"channel_name\": \"My website\",
    \"channel_type\": \"website\",
    \"recipient_id\": \"rec-XXX\",
    \"recording\": \"voluptate\"
}"
Example response:
{
    "data": {
        "id": "num-a81cf765-0e48-4797-b315-f702c783996e",
        "account": {
            "id": "acc-f702dcb6-87cf-4bc4-8632-560c43aec1a4",
            "name": "Auto Bordeaux"
        },
        "channel_name": "Google Ads",
        "channel_type": "googleads",
        "country": "FRA",
        "created_at": "2023-07-14 13:52:27",
        "functionalities": {
            "recording": {
                "deactivation": 1,
                "terms": "custom",
                "terms_audio": "sda-e66b21e0-2064-4175-8fa2-2f7a60e64da4"
            },
            "whisper": {
                "audio": "sda-ef617d12-528a-40fe-a997-da4cda4e4ba7"
            }
        },
        "is_premium": false,
        "number": "0033522334455",
        "recipient": {
            "id": "rcp-3921328c-5966-4df9-a9a9-5f2a8f383e3a",
            "country": "FRA",
            "created_at": "2023-07-14 13:47:21",
            "name": "Concession Bordeaux",
            "number": "0033698765432",
            "type": "mobile"
        },
        "type": "geographic"
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 1
    }
}

Delete a tracked number

DELETE
https://api.magnetis.io
/numbers/{slug}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

slug
string
required

The id of the number.

Example:
num-50700e9e-879e-480a-859a-1db8301bd712

Response Fields

Example request:
curl --request DELETE \
    "https://api.magnetis.io/numbers/num-50700e9e-879e-480a-859a-1db8301bd712" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": "num-a81cf765-0e48-4797-b315-f702c783996e",
        "account": {
            "id": "acc-f702dcb6-87cf-4bc4-8632-560c43aec1a4",
            "name": "Auto Bordeaux"
        },
        "channel_name": "Google Ads",
        "channel_type": "googleads",
        "country": "FRA",
        "created_at": "2023-07-14 13:52:27",
        "functionalities": {
            "recording": {
                "deactivation": 1,
                "terms": "custom",
                "terms_audio": "sda-e66b21e0-2064-4175-8fa2-2f7a60e64da4"
            },
            "whisper": {
                "audio": "sda-ef617d12-528a-40fe-a997-da4cda4e4ba7"
            }
        },
        "is_premium": false,
        "number": "0033522334455",
        "recipient": {
            "id": "rcp-3921328c-5966-4df9-a9a9-5f2a8f383e3a",
            "country": "FRA",
            "created_at": "2023-07-14 13:47:21",
            "name": "Concession Bordeaux",
            "number": "0033698765432",
            "type": "mobile"
        },
        "type": "geographic"
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 1
    }
}

Recipients

List all recipients

GET
https://api.magnetis.io
/recipients
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

account_id
Optional. Filter by account ID.
Example:
acc-XXX
limit
Optional. Result per page. 250 if not set.
Example:
250
page
Optional. Pagination page. 1 if not set.
Example:
1

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/recipients" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 600
                                                                                                                    x-ratelimit-remaining
                                                            : 598
                                                         
{
    "error": "Api key is invalid",
    "data": []
}

Create a recipient

POST
https://api.magnetis.io
/recipients
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Response Fields

Example request:
curl --request POST \
    "https://api.magnetis.io/recipients" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"account_id\": \"acc-6e64b651-026a-46de-ab3e-944a193945a9\",
    \"country\": \"FRA\",
    \"name\": \"Bruno\",
    \"number\": \"003362345XXXX\",
    \"type\": \"geographic\"
}"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 600
                                                                                                                    x-ratelimit-remaining
                                                            : 597
                                                         
{
    "error": "Api key is invalid",
    "data": []
}

Fetch a recipient

GET
https://api.magnetis.io
/recipients/{slug}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

slug
string
required

The id of the recipient.

Example:
rcp-85ea860d-74ce-4ac9-90fd-b85030eb34c0

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/recipients/rcp-85ea860d-74ce-4ac9-90fd-b85030eb34c0" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 600
                                                                                                                    x-ratelimit-remaining
                                                            : 596
                                                         
{
    "error": "Api key is invalid",
    "data": []
}

Update a recipient

PUT
PATCH
https://api.magnetis.io
/recipients/{slug}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

slug
string
required

The id of the recipient.

Example:
rcp-85ea860d-74ce-4ac9-90fd-b85030eb34c0

Body Parameters

Response Fields

Example request:
curl --request PUT \
    "https://api.magnetis.io/recipients/rcp-85ea860d-74ce-4ac9-90fd-b85030eb34c0" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Bruno\"
}"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 600
                                                                                                                    x-ratelimit-remaining
                                                            : 595
                                                         
{
    "error": "Api key is invalid",
    "data": []
}

Delete a recipient

DELETE
https://api.magnetis.io
/recipients/{slug}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

slug
string
required

The id of the recipient.

Example:
rcp-85ea860d-74ce-4ac9-90fd-b85030eb34c0

Response Fields

Example request:
curl --request DELETE \
    "https://api.magnetis.io/recipients/rcp-85ea860d-74ce-4ac9-90fd-b85030eb34c0" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 600
                                                                                                                    x-ratelimit-remaining
                                                            : 594
                                                         
{
    "error": "Api key is invalid",
    "data": []
}

Reports

List all reports

GET
https://api.magnetis.io
/reports
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

account_id
Optional. Filter by account ID.
Example:
acc-XXX
limit
Optional. Result per page. 250 if not set.
Example:
250
page
Optional. Pagination page. 1 if not set.
Example:
1

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/reports" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": "rep-7a3501db-5bc4-4161-aba3-d51f3acc288b",
            "accounts": [],
            "account": {
                "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
                "name": "Immobilier tertiaire"
            },
            "all": 0,
            "created_at": "2024-03-04 09:06:09",
            "period": "weekly",
            "day_week": 2,
            "day_month": null,
            "private": 0,
            "network": null,
            "recipients": [
                {
                    "email": "example@email.fr",
                    "type": "to"
                }
            ],
            "sender": "contact@email.fr",
            "subject": "",
            "title": "Rapport d'extraction des appels manqués",
            "type": "lostcall",
            "user": {
                "id": "usr-0ca9023b-b57b-4a5b-867b-e6858287575f",
                "created_at": "2024-03-04T08:06:08.000000Z",
                "email": "example@email.fr",
                "firstname": "John",
                "lang": "fr",
                "lastname": "Doe",
                "phone": "03 62 XX XX XX"
            }
        },
        {
            "id": "rep-4f6dccfb-33cd-43ce-b94e-ff92e791aab3",
            "accounts": [],
            "account": {
                "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
                "name": "Immobilier tertiaire"
            },
            "all": 0,
            "created_at": "2024-03-04 09:06:09",
            "period": "daily",
            "day_week": null,
            "day_month": null,
            "private": 0,
            "network": null,
            "recipients": [
                {
                    "email": "example@email.fr",
                    "type": "to"
                }
            ],
            "sender": "contact@email.fr",
            "subject": "",
            "title": "Rapport de synthèse",
            "type": "synthesis",
            "user": {
                "id": "usr-0ca9023b-b57b-4a5b-867b-e6858287575f",
                "created_at": "2024-03-04T08:06:08.000000Z",
                "email": "example@email.fr",
                "firstname": "John",
                "lang": "fr",
                "lastname": "Doe",
                "phone": "03 62 XX XX XX"
            }
        },
        {
            "id": "rep-ea6476f6-f777-4e3c-923f-712d676f1168",
            "accounts": [],
            "account": {
                "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
                "name": "Immobilier tertiaire"
            },
            "all": 1,
            "created_at": "2024-03-04 09:06:09",
            "period": "monthly",
            "day_week": null,
            "day_month": 8,
            "private": 0,
            "network": null,
            "recipients": [],
            "sender": "contact@email.fr",
            "subject": "",
            "title": "Rapport de synthèse web",
            "type": "web",
            "user": {
                "id": "usr-0ca9023b-b57b-4a5b-867b-e6858287575f",
                "created_at": "2024-03-04T08:06:08.000000Z",
                "email": "example@email.fr",
                "firstname": "John",
                "lang": "fr",
                "lastname": "Doe",
                "phone": "03 62 XX XX XX"
            }
        },
        {
            "id": "rep-5345fd1a-7331-4242-ab5c-71de77e33818",
            "accounts": [],
            "account": {
                "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
                "name": "Immobilier tertiaire"
            },
            "all": false,
            "created_at": "2024-03-04 09:06:09",
            "period": "monthly",
            "day_week": null,
            "day_month": 12,
            "private": 1,
            "network": null,
            "recipients": [
                {
                    "email": "example@email.fr",
                    "type": "to"
                }
            ],
            "sender": "contact@email.fr",
            "subject": "",
            "title": "Rapport d'extraction des appels",
            "type": "extract",
            "user": {
                "id": "usr-0ca9023b-b57b-4a5b-867b-e6858287575f",
                "created_at": "2024-03-04T08:06:08.000000Z",
                "email": "example@email.fr",
                "firstname": "John",
                "lang": "fr",
                "lastname": "Doe",
                "phone": "03 62 XX XX XX"
            }
        }
    ],
    "links": {
        "first": "https://api.magnetis.io/reports?page=1",
        "last": "https://api.magnetis.io/reports?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://api.magnetis.io/reports",
        "per_page": 250,
        "to": 4,
        "total": 4,
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        }
    }
}

Create a report

POST
https://api.magnetis.io
/reports
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Response Fields

Example request:
curl --request POST \
    "https://api.magnetis.io/reports" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"account_id\": \"acc-6e64b651-026a-46de-ab3e-944a193945a9\",
    \"network_id\": \"net-6e64b651-026a-46de-ab3e-944a193945a9\",
    \"accounts\": \"[acc-6e64b651-026a-46de-ab3e-944a193945a9, acc-cf162a0f-8ea4-4aad-999c-81f8e85cb033]\",
    \"sender\": \"contact\",
    \"all\": false,
    \"recipients\": [
        {
            \"email\": \"email@test.fr\",
            \"type\": \"to\"
        }
    ],
    \"subject\": \"Call-tracking report\",
    \"title\": \"My statistic report\",
    \"type\": \"synthesis\",
    \"period\": \"weekly\",
    \"day_week\": \"1\",
    \"day_month\": \"null\",
    \"enabled\": false
}"
Example response:
{
    "data": {
        "id": "rep-5345fd1a-7331-4242-ab5c-71de77e33818",
        "accounts": [],
        "account": {
            "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
            "name": "Immobilier tertiaire"
        },
        "all": false,
        "created_at": "2024-03-04 09:06:09",
        "period": "monthly",
        "day_week": null,
        "day_month": 12,
        "private": 1,
        "network": null,
        "recipients": [
            {
                "email": "example@email.fr",
                "type": "to"
            }
        ],
        "sender": "contact@email.fr",
        "subject": "",
        "title": "Rapport d'extraction des appels",
        "type": "extract",
        "user": {
            "id": "usr-0ca9023b-b57b-4a5b-867b-e6858287575f",
            "created_at": "2024-03-04T08:06:08.000000Z",
            "email": "example@email.fr",
            "firstname": "John",
            "lang": "fr",
            "lastname": "Doe",
            "phone": "03 62 XX XX XX"
        }
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2024-03-04 09:12:08",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 4
    }
}

Fetch a report

GET
https://api.magnetis.io
/reports/{id}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
The id of the report
required
Example:
rep-c1e6945d-c21b-4bfb-82f8-b08eb7f8128e

Response Fields

Example request:
curl --request GET \
    --get "https://api.magnetis.io/reports/rep-c1e6945d-c21b-4bfb-82f8-b08eb7f8128e" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": "rep-5345fd1a-7331-4242-ab5c-71de77e33818",
        "accounts": [],
        "account": {
            "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
            "name": "Immobilier tertiaire"
        },
        "all": false,
        "created_at": "2024-03-04 09:06:09",
        "period": "monthly",
        "day_week": null,
        "day_month": 12,
        "private": 1,
        "network": null,
        "recipients": [
            {
                "email": "example@email.fr",
                "type": "to"
            }
        ],
        "sender": "contact@email.fr",
        "subject": "",
        "title": "Rapport d'extraction des appels",
        "type": "extract",
        "user": {
            "id": "usr-0ca9023b-b57b-4a5b-867b-e6858287575f",
            "created_at": "2024-03-04T08:06:08.000000Z",
            "email": "example@email.fr",
            "firstname": "John",
            "lang": "fr",
            "lastname": "Doe",
            "phone": "03 62 XX XX XX"
        }
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2024-03-04 09:12:08",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 4
    }
}

Update a report

PUT
PATCH
https://api.magnetis.io
/reports/{id}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
The id of the report
required
Example:
rep-c1e6945d-c21b-4bfb-82f8-b08eb7f8128e

Body Parameters

Response Fields

Example request:
curl --request PUT \
    "https://api.magnetis.io/reports/rep-c1e6945d-c21b-4bfb-82f8-b08eb7f8128e" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"accounts\": \"[acc-6e64b651-026a-46de-ab3e-944a193945a9, acc-cf162a0f-8ea4-4aad-999c-81f8e85cb033]\",
    \"sender\": \"contact\",
    \"all\": false,
    \"recipients\": [
        {
            \"email\": \"email@test.fr\",
            \"type\": \"to\"
        }
    ],
    \"subject\": \"Call-tracking report\",
    \"title\": \"My statistic report\",
    \"type\": \"synthesis\",
    \"period\": \"weekly\",
    \"day_week\": \"1\",
    \"day_month\": \"null\",
    \"enabled\": false
}"
Example response:
{
    "data": {
        "id": "rep-5345fd1a-7331-4242-ab5c-71de77e33818",
        "accounts": [],
        "account": {
            "id": "acc-f27c03a5-9498-4dd1-aeeb-30722b219f2e",
            "name": "Immobilier tertiaire"
        },
        "all": false,
        "created_at": "2024-03-04 09:06:09",
        "period": "monthly",
        "day_week": null,
        "day_month": 12,
        "private": 1,
        "network": null,
        "recipients": [
            {
                "email": "example@email.fr",
                "type": "to"
            }
        ],
        "sender": "contact@email.fr",
        "subject": "",
        "title": "Rapport d'extraction des appels",
        "type": "extract",
        "user": {
            "id": "usr-0ca9023b-b57b-4a5b-867b-e6858287575f",
            "created_at": "2024-03-04T08:06:08.000000Z",
            "email": "example@email.fr",
            "firstname": "John",
            "lang": "fr",
            "lastname": "Doe",
            "phone": "03 62 XX XX XX"
        }
    },
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2024-03-04 09:12:08",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 4
    }
}

Delete a report

DELETE
https://api.magnetis.io
/reports/{id}
requires authentication

Headers

x-api-key
Example:
{YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
The id of the report
required
Example:
rep-c1e6945d-c21b-4bfb-82f8-b08eb7f8128e

Response Fields

Example request:
curl --request DELETE \
    "https://api.magnetis.io/reports/rep-c1e6945d-c21b-4bfb-82f8-b08eb7f8128e" \
    --header "x-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [],
    "meta": {
        "apiKey": {
            "id": "key-d464804c-61a5-494b-a2ce-db765f5691c2",
            "created_at": "2023-07-25 12:00:00",
            "expiration": null,
            "level": "account",
            "name": "My account"
        },
        "total": 0
    }
}