# Mautic API query with curl

**URL:** <https://forum.mautic.org/t/mautic-api-query-with-curl/16977>\
**Category:** Development\
**Tags:** development\
**Created:** [November 11, 2020, 10:27am UTC](https://forum.mautic.org/t/mautic-api-query-with-curl/16977 "2020-11-11T10:27:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![redwong](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/redwong/32/3825_2.png) [@redwong](https://forum.mautic.org/u/redwong)\
**Post date:** [November 11, 2020, 10:27am UTC](https://forum.mautic.org/t/mautic-api-query-with-curl/16977/1 "2020-11-11T10:27:02Z")

</div>

Hi, Should I use the mautic username /password for the following request?

curl -X GET [https://your-mautic.com/api/contacts/[[contact-id]](https://your-mautic.com/api/contacts/%5B%5Bcontact-id%5D)] -u [[username]]:[[password]

It’s the example query in the KB.

> **[What is Mautic's API?](https://kb.mautic.org/knowledgebase/development/what-is-mautics-api)**
>
> Mautic API. Mautic has a great API to interact with other systems. The REST API serves as a powerful gateway to the Mautic system. It supports an ample amount of calls allowing users to programmatically create, read, delete, and modify different...

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [November 11, 2020, 12:46pm UTC](https://forum.mautic.org/t/mautic-api-query-with-curl/16977/2 "2020-11-11T12:46:07Z")

</div>

Yes. And make sure you turn on API and clear cache.

---

<div class="post-metadata">

**Author:** ![redwong](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/redwong/32/3825_2.png) [@redwong](https://forum.mautic.org/u/redwong)\
**Post date:** [November 11, 2020, 12:55pm UTC](https://forum.mautic.org/t/mautic-api-query-with-curl/16977/3 "2020-11-11T12:55:47Z")

</div>

Thanks, It works after cleaning cache.
