# Contacts

* [Bubble.io Plugin](#bubble.io-plugin)
* [JavaScript SDK](#javascript-sdk)

### 🧋 Bubble.io Plugin

#### Natively - Contacts

!!! YOU NEED TO SET "ContactsObject (Natively - ... " into element field

<figure><img src="/files/TlIxqpoH4UsDhNgIlRCG" alt=""><figcaption></figcaption></figure>

#### Events:

* Get All Contacts Success
* Get All Contacts Failed
* Create Contact Success
* Create Contact Failed

#### States:

* Get Contacts Result - list of ContactObject's
  * ContactObject:
    * FirstName
    * LastName
    * Phones - Array of contacts phone numbers, if there are 2 or more phone numbers, it's separated by a comma (example: "05435235235,124334234")
    * Emails - Array of contacts emails. If there are 2 or more emails, it's separated by a comma (example: "<test@test.co>,<build@natively.co>")
    * ID - unique contact identifier on these device.
* Create Contact ID Result - Id of created contact after calling **Create Contact** action
* Create/Get Contacts Status - Result status after calling **Create Contact** or **Get all contacts**

#### Actions:

* Get All Contacts - response: list of ContactObject's
* Create Contact - response: Contact ID
  * First name - **Required**
  * Last name
  * Phone
  * Email
* Get Contact By ID - response: list of ContactObject's

###

### 🛠 JavaScript SDK

#### NativelyContacts

{% code overflow="wrap" lineNumbers="true" %}

```javascript
const contacts = new NativelyContacts()
const contacts_save_callback = function(resp) {
        console.log(resp.id);
        console.log(resp.status);
};
const contacts_all_callback = function (resp) {
        console.log(resp.contacts);
        console.log(reps.status); // "SUCCESS"/"FAILED"
};
contacts.getAllContacts(contacts_all_callback);
contacts.createContact(contacts_save_callback);
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.buildnatively.com/guides/integration/contacts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
