Skip to main content
Question

API Endpoint for Creating Contacts Returning ACCOUNT_SPECIFIED_INVALID

  • December 26, 2024
  • 8 replies
  • 63 views

Forum|alt.badge.img+2
Hi DocuSign Support Team,

I am reaching out regarding an issue with the API endpoint for creating contacts.

When making the following POST request to create a contact:

curl --location 'https://api.docusign.net/restapi/v2.1/accounts/{accountId}/contacts' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {access_token}' \
--data '{
  "contacts": [
    {
      "name": "John Doe",
      "emails": [
        "john.doe@example.com"
      ],
      "organization": "Example Corp",
      "shared": "true"
    }
  ]
}'

We receive the following error response:

{

    "errorCode": "ACCOUNT_SPECIFIED_INVALID",
    "message": "The account id provided does not exist, or is improperly formatted."
}

However, when the request method is changed to GET and the body is removed, the call works as expected, confirming that the account ID is valid.

Could you please assist in identifying the root cause of this issue? It appears the endpoint is not processing POST requests correctly for contact creation.

Thank you for your time and support.

--

Regards,
Muhammad Umar

8 replies

JohnSantos
Valued Contributor
Forum|alt.badge.img+18
  • Valued Contributor
  • 975 replies
  • December 26, 2024

@umar8092 

Replace "organization" with "company", as DocuSign’s API expects "company" for contact creation.


Forum|alt.badge.img+2
  • Author
  • Newcomer
  • 4 replies
  • January 2, 2025

Hey @john
Thanks for the advice, I tried with company instead of organization and i got the same error.
Please test out this API and confirm if this works for you.
This was my new request Body

{
  "contacts": [
    {
      "name": "John Doe",
      "emails": [
        "john.doe@example.com"
      ],
      "company": "Example Corp",
      "shared": "true"
    }
  ]
}


 


JohnSantos
Valued Contributor
Forum|alt.badge.img+18
  • Valued Contributor
  • 975 replies
  • January 2, 2025

@umar8092 

Try removing "shared": "true" from the request body. Some accounts disallow shared contacts, resulting in unusual errors.

Confirm with that your user is allowed to create contacts.

Although you tried both "organization" and "company", neither is strictly required. If there is a permissions or environment mismatch, the request will still fail—but it’s good to confirm that your JSON body is otherwise valid.

Send the most basic possible JSON body:

json
Copy code
{
  "contacts": [
    {
      "name": "John Doe",
      "emails": [
        "john.doe@example.com"
      ]
    }
  ]
}
Make sure Content-Type: application/json is correct.
If that minimal request still fails with the same error, it strongly points to an environment or permission issue.
 


Forum|alt.badge.img+2
  • Author
  • Newcomer
  • 4 replies
  • January 2, 2025

Thanks ​@JohnSantos for helping out here. I really appreciate it.
I have removed the shared key from the requestBody as well, Please let me know if i need to change any permissions, The GET All Contacts call works fine also i am able to create contacts from the UI so i don’t think its a permissions issue but please let me know if i need to update anything.
Also can you confirm if you tried using this API?

Please check this screenshot:
(ID removed for security purpose)

 


JohnSantos
Valued Contributor
Forum|alt.badge.img+18
  • Valued Contributor
  • 975 replies
  • January 2, 2025

@umar8092 

The only two things I can think of is if the email is already present in the account’s address book, DocuSign may respond with an error.

Also, check the user or integration key must have the right roles/scopes to create contacts.


Forum|alt.badge.img+2
  • Author
  • Newcomer
  • 4 replies
  • January 7, 2025

Hey ​@JohnSantos 
I have tried with multiple emails as well, and i do have the rights for Contact creation. If anyone could confirm that the API is working for them that would make it more clearer, Whether its an account related issue or an API related bug.


Forum|alt.badge.img+2
  • Author
  • Newcomer
  • 4 replies
  • January 10, 2025

Hi ​@JohnSantos 
Can i please get an update here :)
I really appreciate your input.


JohnSantos
Valued Contributor
Forum|alt.badge.img+18
  • Valued Contributor
  • 975 replies
  • January 10, 2025

@umar8092 

It worked for me.  

{
  "contactList": [
    {
      "name": "Test4",
      "organization": "Test4",
      "emails": [
        "test@gmail.com"
      ]
    }
  ]
}

Check out the postContacts | REST API | Docusign Explorer.   You can review the syntax there and what is required. 

 

Maybe you needed to use ContactList and not just Contacts on your json.