Movidesk API - People
37 min
Created by Reinaldo Martins Thoma on 7/15/2016 1:13 PM
Updated by Leonora Garcia Alves on 5/6/2025 6:17 PM
Important: Our APIs have a limit of 10 requests per minute to ensure healthy usage. If you have a specific scenario that requires increased usage, please contact our support team for a feasibility analysis. Learn more about API access hours and limits
https://api.movidesk.com/public/v1

People

 

Note: The password created for this API must contain at least 8 digits.

 

  URL:    /persons
  Methods: GET / POST / PATCH / DELETE

Layout

person

PropertyTypeSizeRequiredDescription
idstring64 Field 'Ref. Code': Unique identifier of the person (alphanumeric). Read-only after creation.
codeReferenceAdditionalstring64 Field Code Ref. Additional. Non-mandatory, but unique identifier of the person.  (Alphanumeric)
isActivebool Field Person enabled.
personTypeint1Person type. Person = 1, Company = 2, Department = 4.
profileTypeint1Profile type. Agent = 1, Client = 2, Agent and Client = 3.
accessProfilestring128*Field Access profile. Must be an access profile already registered in Movidesk. If an invalid access profile is provided, the system will return an error. *Mandatory field when the person is an Agent profile. If the profile is Client and this field is not provided, the system will set the default client access profile.
corporateNamestring128*Corporate name. *Mandatory field when the person is of type Company and the trade name has not been provided.
businessNamestring128Trade name for companies or Name for individuals and departments.
businessBranchstring128 Field Business branch for a Company-type person.
cpfCnpjstring14 CPF (11 digits) for individuals, CNPJ (14 digits) for companies, and non-existent for departments.
userNamestring64Field Username. Must be unique per domain. Mandatory when a domain for authentication other than Movidesk is provided.
passwordstring32 Field Password. The password content is for writing only and cannot be retrieved in queries.
rolestring128 Person's role. If an unexisting role is provided, it will be created.
bossIdstring64 
bossIdstring64 Existing Id (Ref. Code) of the person's hierarchical superior. 
bossNamestring128 Name of the hierarchical superior (read-only).
classificationstring128 Person's classification. If an unexisting classification is provided, it will be created.
cultureIdstring32*Person's language in the Microsoft CultureCode standard. Example for Brazilian Portuguese: pt-BR. *If not provided, the system admin's language will be used.
timeZoneIdstring64*Person's time zone in the IANA standard. Example for Brasília's time zone: America/Sao_Paulo. *If not provided, the system admin's time zone will be used.
authenticateOnstringmax If directory authentication is enabled and the person authenticates in a domain other than Movidesk, the server and domain already registered in the system must be informed. Ex: hostdomeuservidorad\dominiodomeuservidorad
createdDatedatetime UTC  Person's creation date. It must be less than or equal to the current date. The provided date must be in UTC format*. If the field is not provided, it will be populated with the current date. Read-only after creation.
createdBystring128 Ref. Code of the person who created the consulted person. Read-only field.
changedDatedatetime UTC  Last modification date of the person. Read-only field.
changedBystring128 Ref. Code of the person who last modified the consulted person. Read-only field.
observationsstringmax Observations.
addressesarray  List of addresses. see documentation
contactsarray  List of contacts. see documentation
emailsarray  List of emails. see documentation
teamsarray *Array of strings with the team names. *When the person's profile type is Agent, it is necessary to provide at least one team.
relationshipsarray List of the person's relationships. There must be a single relationship per organization. *It may be mandatory (if set to be so) when the person's type is Person and the profile type is Client. see documentation
customFieldValuesarray  List of the ticket's additional field values. see documentation
atAssetsarray  List of Asset values.
Attention: Movidesk APIs may take a few minutes to replicate tickets, users, and other records, whether new and/or modified. Therefore, they may not appear in search results immediately.

People » Addresses

person.addresses[n]

PropertyTypeSizeRequiredDescription
addressTypestring128Address type (Commercial, Residential, etc). If a non-existent type is provided, it will be created automatically.
countrystring128 Country name.
postalCodestring32 Postal code.
statestring128 State.
citystring128 City.
districtstring128 District.
streetstring128 Street name e.g., Joinville Street.
numberstring32 Number.
complementstring128 Complement e.g., Room 201.
referencestring128 Reference point e.g., Near the university.
isDefaultbool Indicator if this is the person's main address. Only one address can be the main address. 

People » Contacts

person.contacts[n]

PropertyTypeSizeRequiredDescription
contactTypestring128Contact type e.g., (Phone, Mobile, Skype, etc). If an invalid type is provided, it will be created.
contactstring128Description e.g., (11) 9999-9999.
isDefaultbool Indicator if this is the person's main contact. Only one contact can be the main contact.  

People » Emails

person.emails[n]

PropertyTypeSizeRequiredDescription
emailTypestring128Email type e.g., (Personal, Professional, etc). If an invalid type is provided, it will be created.
emailstring128Person's email, must be valid.
isDefaultbool Indicator if this is the person's main email. Only one email can be the main email. 

People » Organizations

person.relationships[n]

PropertyTypeSizeRequiredDescription
idstring64 Existing Id (Ref. Code) of the company or department to which the person belongs. To indicate hierarchy, the pattern IdParent/IdChild must be followed. To set up the SLA contract and allowed services without linking the person to any organization, do not provide this parameter.
namestring128 Description of the hierarchy (Read-only).
slaAgreementstring128 SLA contract used by the client. Must be an SLA contract already registered in Movidesk. If an invalid SLA contract is provided, the system will return an error.
forceChildrenToHaveSomeAgreementbool If this value is set to true, all people linked to this hierarchy will be required to have the same SLA contract.
allowAllServicesbool *If this value is true, the person will have access to all items in the service catalog. Otherwise, the services the person will have access to must be specified. *If this value is not provided, it will be defaulted to true.
includeInParentsbool  If this value is true, this relationship will be included in the people of the parent organization, and to remove it, you will need to manually delete this relationship from the people in the parent organization.
loadChildOrganizationsbool  If this value is true, relationships with the child organizations of the parent organization will be included, and to undo this, it will be necessary to manually remove these relationships.
servicesarray *List of services the person will have access to. *It is mandatory to provide at least one service when the allowAllServices field is false. see documentation

People » Organization » Services

person.relationships[n].services[n]

PropertyTypeSizeRequiredDescription
idint10Id (Code) of the service. This can be obtained from the service query on the website.
namestring128 Name of the service (Read-only).
copyToChildrenbool *If this value is true, this service will be included for all people associated with this hierarchy. *If this value is not provided, it will default to true.

People » Custom Fields

person.customfieldvalues[n]

PropertyTypeSizeRequiredDescription
customFieldIdint64Id of the custom field (can be obtained from the list of custom fields on the website).
customFieldRuleIdint64Id of the custom field display rule (can be obtained from the list of display rules on the website).
lineint64Number of the line in the display rule on the person's registration screen. When the rule does not allow the addition of new lines, enter the value 1, and do not repeat additional field values for the rule id in conjunction with the field id. To change the value of a field, specify the line where it is located. Fields that are in the database but not sent in the request body will be deleted.
valuestringmax *Text value of the custom field. *Required when the field type is: single line text, multi-line text, HTML text, regular expression, numeric, date, time, date and time, email, phone, or URL. Date fields must be in *UTC time and in the format YYYY-MM-DDThh:MM:ss.000Z, and the time field must be provided along with the fixed date "1991-01-01". The numeric field should be in Brazilian format, for example "1.530,75".
itemsarray List of items. *Required when the field type is: value list, people list, client list, agent list, multi-selection, or single-selection. Only one item should be provided if the custom field does not allow multiple selections. When the field is a file, it is read-only. see documentation

People » Custom Fields » Items

person.customfieldvalues.items[n]

PropertyTypeSizeRequiredDescription
personIdint64*Id (Ref. Code) of the company, department, or person. *Required when the field type is people list.
clientIdint64*Id (Ref. Code) of the company, department, or person. *Required when the field type is client list.
teamstring128*Team name. *Required when the field type is agent list (personId can be provided to specify the agent of the team).
customFieldItemstring256*Name of the custom field item. *Required when the field type is: value list, multi-selection, or single-selection.

People » Assets

person.atAssets[n]

PropertyTypeSizeRequiredDescription
Idstring64*Field Ref. Code. Unique identifier of the asset. (Alphanumeric)
namestring64 Name of the asset
labelstring64 

Label field (Alphanumeric)

*UTC: Coordinated Universal Time (from English Universal Time Coordinated) is the reference time zone from which all other time zones in the world are calculated. For example: If your time zone is Brasília (UTC-03:00) and the current time is 15:30, the UTC time will be 18:30.

Working with Data

To access the data, you first need to generate an API key

To generate an API key (token), access Movidesk, go to Settings / Account / Parameters and in the environment tab click the "Generate New Key" button if you do not already have one created.
You can repeat this operation whenever you want to generate a new access key, but remember that generating a new key will cause all programs using the old key to stop working.

All data flows (Viewing/Inserting/Updating) must be in JSON format as shown in the example below:

{ "id": "1", "codeReferenceAdditional": "33B", "isActive": true, "personType": 1, "profileType": 3, "accessProfile": "Administrators", "businessName": "Movidesk", "corporateName": "Movimentti systems", "cpfCnpj": "012345678900", "userName": "admin", "password": null, "role": null, "bossId": null, "classification": null, "cultureId": "en-US", "timeZoneId": "America/Sao_Paulo", "createdDate": "2014-12-17T18:00:43.3339728", "observations": "Registration done via person API.", "addresses": [ { "addressType": "Commercial", "country": "Brazil", "postalCode": "89035200", "state": "Santa Catarina", "district": "Vila Nova", "street": "Rua Joinville", "number": "209", "complement": "Room 201", "reference": "Next to FURB", "isDefault": true } ], "contacts": [ { "contactType": "Business phone", "contact": "(47) 3035-4150", "isDefault": true }, { "contactType": "Mobile phone", "contact": "(47) 9999-9999", "isDefault": false } ], "emails": [ { "emailType": "Professional", "email": "atendimento@movimentti.movidesk.com", "isDefault": true } ], "teams": [ "Administrators", "Consulting" ], "relationships": [ { "id": "2113", "name": "Movimentti", "slaAgreement": "Standard SLA contract", "forceChildrenToHaveSomeAgreement": false, "allowAllServices": false, "services": [ { "id": 5706, "name": "Support" } ] } ], "customFieldValues": [ { "customFieldId": 3, "customFieldRuleId": 2, "line": 1, "value": null, "items": [ { "personId": null, "clientId": null, "team": null, "customFieldItem": "one" } ] }, { "customFieldId": 1, "customFieldRuleId": 1, "line": 1, "value": "text via API", "items": [] } ] }

Fetching data

Method GET

Fetching a single person

GET: /persons
 Parameters: id, token

Example:

Fetching the person with id 1

GET: https://api.movidesk.com/public/v1/persons?token=52ee6ca5-8639-422b-bafe-470013c11176&id=1

Response:

  {
    "id": "1",
    "codeReferenceAdditional": "33B",
    "isActive": true,
    "personType": 1,
    "profileType": 3,
    "accessProfile": "Administrators",
    "businessName": "Movidesk",
    "corporateName": "Movimentti systems",
    "cpfCnpj": "012345678900",
    "userName": "admin",
    ... Other columns in the format of the above layout
  }

Fetching a list of people

GET: /persons
 Parameters: token

Example:

Fetching a list of people

GET: https://api.movidesk.com/public/v1/persons?token=52ee6ca5-8639-422b-bafe-470013c11176

Response:

  [
    {
      "id": "1",
      "codeReferenceAdditional": "33B",
      "isActive": true,
      "personType": 2,
      "profileType": 3,
      "accessProfile": "Administrators",
      "businessName": "Movidesk",
      "corporateName": "Movimentti systems",
      "cpfCnpj": "012345678900",
      "userName": "admin",
      ... Other columns in the format of the above layout
    },
    {
      "id": "2",
      "codeReferenceAdditional": "34B",
      "isActive": true,
      "personType": 1,
      "profileType": 1,
      "accessProfile": "Clients",
      "businessName": "Client A",
      "corporateName": "Client A",
      "cpfCnpj": "012345678901",
      "userName": "clientA",
      ... Other columns in the format of the above layout
    }
    ... Other items in the list 
  ]

 

Fetching people with filters

GET: /persons
Parameters: token

To enable and simplify queries with filters, the API uses the open protocol OData. The possible filters are:
• $filter: the expression specified with this filter is evaluated for each item in the query result, and only the items where the expression result is true will be included in the final result;
• $orderby: allows the items in the query result to be ordered either ascending (asc) or descending (desc). If neither asc nor desc is specified, the default will be asc;
• $top: allows specifying the number of items that should be included in the query result;
• $skip: allows specifying the number of items that should be skipped and not included in the query result;
• $select: allows specifying specific properties of the items that should be filled in the query result;
• $expand: allows expanding the child collections of the queried items.

Note: $select clauses are always ignored when they are inside an $expand. That is, when an $expand exists, the API returns all available parameters in the array, and it is not possible to limit.

Examples:

Fetching a list of people who are of client profile type:

GET: https://api.movidesk.com/public/v1/persons?token=52ee6ca5-8639-422b-bafe-470013c11176&$filter=profileType eq 2

Response:
[
    {
      "id": "1",
      "codeReferenceAdditional": "33B",
      "isActive": true,
      "personType": 2,
      "profileType": 2,
      "accessProfile": "Clients",
      "businessName": "Client A",
      "corporateName": "Client A",
      "cpfCnpj": "012345678900",
      "userName": "clientA",
      ... Other columns in the format of the above layout
    },
    {
      "id": "2",
      "codeReferenceAdditional": "34B",
      "isActive": true,
      "personType": 1,
      "profileType": 2,
      "accessProfile": "Clients",
      "businessName": "Client B",
      "corporateName": "Client B",
      "cpfCnpj": "012345678901",
      "userName": "clientB",
      ... Other columns in the format of the above layout
    }
    ... Other items in the list with profileType equal to 2
  ]


Fetching a list of people who are of client type and ordered in descending order by id:

GET: https://api.movidesk.com/public/v1/persons?token=52ee6ca5-8639-422b-bafe-470013c11176&$filter=profileType eq 2&$orderby=id desc

Response:
[
    { 
      "id": "2",
      "codeReferenceAdditional": "34B",
      "isActive": true, "personType": 1,
      "profileType": 2, "accessProfile": "Clients",
      "businessName": "Client B",
      "corporateName": "Client B",
      "cpfCnpj": "012345678901",
      "userName": "clientB",
       ... Other columns in the format of the above layout },    
    {
      "id": "1",
      "codeReferenceAdditional": "33B",
      "isActive": true,
      "personType": 2,
      "profileType": 2,
      "accessProfile": "Clients",
      "businessName": "Client A",
      "corporateName": "Client A",
      "cpfCnpj": "012345678900",
      "userName": "clientA",
      ... Other columns in the format of the above layout
    }    
    ... Other items in the list sorted in descending order by id and with profileType equal to 2
  ]

 

Fetching a list of people who are of client type, sorted in descending order by id and filtering the result to get only 100 people, while skipping the first 100 (used for pagination of the result, in this case to get the second page):

GET: https://api.movidesk.com/public/v1/persons?token=52ee6ca5-8639-422b-bafe-470013c11176&$filter=profileType eq 2&$orderby=id desc&$top=100&$skip=100

Response:
[
    { 
      "id": "102",
      "codeReferenceAdditional": "134B",
      "isActive": true, 
      "personType": 1,
      "profileType": 2, 
      "accessProfile": "Clients",
      "businessName": "Client B",
      "corporateName": "Client B",
      "cpfCnpj": "012345678901",
      "userName": "clientB",
       ... Other columns in the format of the above layout },    
    {
      "id": "101",
      "codeReferenceAdditional": "133B",
      "isActive": true,
      "personType": 2,
      "profileType": 2,
      "accessProfile": "Clients",
      "businessName": "Client A",
      "corporateName": "Client A",
      "cpfCnpj": "012345678900",
      "userName": "clientA",
      ... Other columns in the format of the above layout
    }    
    ... Other 98 items in the list sorted in descending order by id and with profileType equal to 2
  ]


Fetching the id and name of people who are of client type, sorted in descending order by id and filtering the result to get only 100 people, while skipping the first 100 (used for pagination of the result, in this case to get the second page):

GET: https://api.movidesk.com/public/v1/persons?token=52ee6ca5-8639-422b-bafe-470013c11176&$select=businessName,id&$filter=profileType eq 2&$orderby=id desc&$top=100&$skip=100

Response:
[
    { 
      "id": "102", 
      "businessName": "Client B"
    },    
    {
      "id": "101",     
      "businessName": "Client A"    
    }    
    ... Other 98 items in the list sorted in descending order by id and with profileType equal to 2
  ]

 

Fetching the id, name, organizations, and allowed services of people who are of client type, sorted in descending order by id and filtering the result to get only 100 people, while skipping the first 100 (used for pagination of the result, in this case to get the second page):

GET: https://api.movidesk.com/public/v1/persons?token=52ee6ca5-8639-422b-bafe-470013c11176&$select=businessName,id&$expand=relationships($expand=services)&$filter=profileType eq 2&$orderby=id desc&$top=100&$skip=100

Response:
[
    { 
      "id": "102", 
      "businessName": "Client B",  
      "relationships": [
      {
        "id": "2113",
        "name": "Movimentti",
        "slaAgreement": "Standard SLA Agreement",
        "forceChildrenToHaveSomeAgreement": false,
        "allowAllServices": false,
        "services": [
         {
           "id": 5706,
           "name": "Support"
         }
       ]
      }
    ]},    
    {
      "id": "101",     
      "businessName": "Client A",  
      "relationships": [
      {     
        "slaAgreement": "Standard SLA Agreement",
        "forceChildrenToHaveSomeAgreement": false,
        "allowAllServices": true,
        "services": []
      }
    ]}
    }    
    ... Other 98 items in the list sorted in descending order by id and with profileType equal to 2
]

 

Fetching people who have at least one email equal to "email@movidesk.com":

GET: https://api.movidesk.com/public/v1/persons?token=52ee6ca5-8639-422b-bafe-470013c11176&$filter=Emails/any(e: e/email eq 'email@movidesk.com')

Response:
[
    { 
      "id": "102", 
      "businessName": "Client B",  
      ... Other properties of the person  
      "emails": [
      {
       "emailType": "Commercial",
       "email": "email@movidesk.com",
       "isDefault": true
      },
      {
       "emailType": "Personal",
       "email": "other.email@movidesk.com",
       "isDefault": false
      }],    
    {
      "id": "101",     
      "businessName": "Client A",
      ... Other properties of the person  
      "emails": [
      {
       "emailType": "Commercial",
       "email": "email@movidesk.com",
       "isDefault": true
      }
    ]}
    }    
    ... Other items in the list that contain at least one email equal to "email@movidesk.com"
]

 


Inserting Data

Method POST

POST: /persons
 Parameters: token, returnAllProperties (default value is false)
 Headers: Content-Type: application/json
 Request Body: {JSON object}

Example:
POST: https://api.movidesk.com/public/v1/persons?token=52ee6ca5-8639-422b-bafe-470013c11176&returnAllProperties=false
Headers: Content-Type: application/json
RequestBody:
{
  "id": "1",
  "codeRefAdditional": "33B",
  "isActive": true,
  "personType": 2,
  "profileType": 3,
  "accessProfile": "Administrators",
  "businessName": "Movidesk",
  "corporateName": "Movimentti sistemas",
  "cpfCnpj": "012345678900",
  "userName": "admin",
  ... Other columns in the format of the layout above
}

Response: Status 200 and in the body the id (reference code) of the inserted person.

 

Inserting Organizations for a Person

Method POST

POST: /persons/relationships
 Parameters: token, id
 Headers: Content-Type: application/json
 Request Body: {JSON object}

Example:

Including the relationship of person with id 1 with organization of id 123

POST: https://api.movidesk.com/public/v1/persons/relationships?token=52ee6ca5-8639-422b-bafe-470013c11176&id=1
Headers: Content-Type: application/json
RequestBody:
{
  "relationships": [
        {
             "id": "123",
             "allowAllServices": true
        }
  ]
}

Response: Status 200 

 


Updating Data

Method PATCH

Unlike data insertion (POST), updating is done partially. Thus, it is necessary to send only the data that you want to change to the server.

However, modifying lists (child objects) always overwrites all items in the list.

PATCH: /persons
 Parameters: token, id
 Headers: Content-Type: application/json
 Body: {JSON object}

Examples:

Changing the name of the person with id 1

PATCH: https://api.movidesk.com/public/v1/persons?token=52ee6ca5-8639-422b-bafe-470013c11176&id=1
Headers: Content-Type: application/json
RequestBody:
{
  "businessName": "Movidesk"
}

Response: Status 200

In the example above, only the businessName field is changed; other fields remain unchanged

Removing the emails of the person with id 1

PATCH: https://api.movidesk.com/public/v1/persons?token=52ee6ca5-8639-422b-bafe-470013c11176&id=1
Headers: Content-Type: application/json
RequestBody:
{
  "emails": []
}

Response: Status 200

As emails are in a list, in the example above, all emails are removed. This is because the values provided in the list always overwrite the previously stored values.


Deleting People

Method DELETE


DELETE: /persons
Parameters: token, id
Headers: Content-Type: application/json
Request Body: {JSON object}

Examples:

Deleting the person with id 1

DELETE: https://api.movidesk.com/public/v1/persons?token=52ee6ca5-8639-422b-bafe-470013c11176&id=1
Headers: Content-Type: application/json

Response: Status 200

 


Source Code Example in C# for the API Call

Method POST

try
{
   var person = new
   {
     isActive = true
   };
   var json = JsonConvert.SerializeObject(person);

   var response = await SendAsync("https://api.movidesk.com/public/v1/persons?token=YOURTOKEN",
   json, "POST", "application/json"); 
}
catch (WebException ex)
{
   var response = new StreamReader(ex.Response.GetResponseStream()).ReadToEnd();
}

public static async Task<string> SendAsync(string uri, string content, string method, string contentType)
{
  var req = WebRequest.Create(uri);
  req.ContentType = contentType;
  req.Method = method;

  using (var stream = await req.GetRequestStreamAsync())
  using (var streamWriter = new StreamWriter(stream))
  {
    await streamWriter.WriteAsync(content);
  }

  var httpResponse = (HttpWebResponse)await req.GetResponseAsync();
  using (var stream = httpResponse.GetResponseStream())
  {
    if (stream == null)
       return null;

    using (var streamReader = new StreamReader(stream))
    { 
       return await streamReader.ReadToEndAsync();
    }
  }
}

In the example above, the person will not be inserted because there are several errors in the request body. The errors are detailed in the response variable and should be corrected by following this documentation.