REST API V1 Invite To Team Error 500


Hello Miro Community,

I am building an onboarding automation and I’m using an HTTP request to invite users to our team. Here is what I have so far:

{

    "uri": "https://api.miro.com/v1/teams/{team_id}/invite",

    "method": "POST",

    "headers": {

        "Accept": "application/json",

        "Content-Type": "application/json",

        "Authorization": "*sanitized*"

    },

    "body": {

        "email": "{user_email_address}"

    }

}

I do have the team_id correct in the actual request and the bearer token inserted in the Authorization header. I’m following the instructions here. I can run this request in Miro’s test request on this page and it works fine. However, when I send my request from my automation, I get this error: 

  "body": {

        "status": 500,

        "code": "internalError",

        "message": "Internal Error",

        "type": "error"

    }

Has anyone else run into an issue like this? Is there something I can adjust in my request to get this to run successfully?


3 replies

Hey @Dylan Richards,

 

Thanks for reaching out about this, and happy to help.

 

As a first step, can I kindly ask that you double check you’re passing the email field correctly? This should be an array of string(s), but the example you’ve shared is an object and you’ve passed ‘email’ instead of ‘emails’. Can you try the following format for your request body:

{
"emails": [
"someone@example.com"
]
}

Let me know if this helps—thanks!
Will

@Will Bishop just a little attention to detail and I could’ve figured it out myself…. That worked! Thank you so much for your help!

No problem, glad I could help! 😄

Reply