Enable GraphQL API

To make GraphQL API calls, you have to generate the GraphQL schema first via GraphQL enable API. The schema is unique for each Zoho CRM profile. It is sufficient to invoke this API call once for each profile. After that, any change in the data model will be taken care of by Zoho CRM automatically.

Request Details

Request URL

{api-domain}/crm/graphql/actions/enable

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

ZohoCRM.GraphQL.UPDATE

Note

It may take up to five minutes for meta changes to reflect in the schema.

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/graphql/actions/enable"
-X POST
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"

Possible Errors

  • ALREADY_ENABLED HTTP 400

    Schema is already generated for profile id.

    Resolution:You need to invoke GraphQL enable API only once.

  • CANNOT_PROCESS HTTP 400

    GraphQL enable API is invoked while the earlier request for schema generation through the same API is in progress for the same profile id.

    Resolution:You need to invoke GraphQL enable API only once.

  • FEATURE_NOT_SUPPORTED HTTP 400

    Your Zoho CRM Edition does not support GraphQL.

    Resolution: Please try GraphQL APIs from one of the supported editions. It is supported for Enterprise, Zoho One Enterprise, CRM Plus and Ultimate edition orgs. Please note that GraphQL APIs are not available for Trial Edition of these editions.

  • OAUTH_SCOPE_MISMATCH HTTP 401

    Your client does not have required scope and is unauthorised.

    Resolution: Client does not have ZohoCRM.GraphQL.UPDATE scope. Create a new client with valid scope. Refer to the scope section above.

Sample Response

Copied{
    "code": "SUCCESS",
    "details": {
        "profile": {
            "id": "111111000000000419"
        }
    },
    "message": "graphql schema generated successfully for your profile",
    "status": "success"
}