PHPackages                             ascension/php-surveymonkey - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. ascension/php-surveymonkey

ActiveLibrary[API Development](/categories/api)

ascension/php-surveymonkey
==========================

PHP class for SurveyMonkey API

1.0.6(11y ago)425.1k↓92.9%1[1 PRs](https://github.com/ascension/php-surveymonkey/pulls)MITPHPPHP &gt;=5.3.0

Since Jun 9Pushed 10y ago1 watchersCompare

[ Source](https://github.com/ascension/php-surveymonkey)[ Packagist](https://packagist.org/packages/ascension/php-surveymonkey)[ RSS](/packages/ascension-php-surveymonkey/feed)WikiDiscussions master Synced yesterday

READMEChangelog (6)DependenciesVersions (7)Used By (0)

PHP class for SurveyMonkey API
==============================

[](#php-class-for-surveymonkey-api)

Basic usage
-----------

[](#basic-usage)

```
$SM = new SurveyMonkey("myApiKey" , "myAccessToken");
$result = $SM->getSurveyList();
if ($result["success"]) print_r( $result["data"]["surveys"] );
else print_r($result["message"]);   // Print out the error message

```

All methods return an array containing a **success** boolean, and the **data** -or- an error **message**

Advanced
--------

[](#advanced)

```
$SM = new SurveyMonkey("myApiKey" , "myAccessToken",
    array(  // Override default API options (quite useless at the moment)
        'protocol' => 'http',                       // will not work.. they require SSL
        'hostname' => 'fake-api.surveymonkey.net'   // will also not work..
    ),
    array(  // CURL override options
        CURLOPT_SSL_VERIFYPEER => false     // Better add cacert.pam, no?
        // ......
    )
);
$result = $SM->getSurveyList(array(
    "fields" => array(
        "title",
        "analysis_url",
        "date_created",
        "date_modified",
        "question_count",
        "num_responses"
    ),
    'page_size' => 50,
    'page' => 2
));

```

All methods
-----------

[](#all-methods)

**getSurveyList**

```
/**
 * Retrieves a paged list of surveys in a user's account.
 * @see https://developer.surveymonkey.com/mashery/get_survey_list
 * @param array $params optional request array
 * @return array Result
 */
public function getSurveyList($params = array()){}

```

**getSurveyDetails**

```
/**
 * Retrieve a given survey's metadata.
 * @see https://developer.surveymonkey.com/mashery/get_survey_details
 * @param string $surveyId Survey ID
 * @return array Results
 */
public function getSurveyDetails($surveyId){}

```

**getCollectorList**

```
/**
 * Retrieves a paged list of collectors for a survey in a user's account.
 * @see https://developer.surveymonkey.com/mashery/get_collector_list
 * @param string $surveyId Survey ID
 * @param array $params optional request array
 * @return array Results
 */
public function getCollectorList($surveyId, $params = array()){}

```

**getRespondentList**

```
/**
 * Retrieves a paged list of respondents for a given survey and optionally collector
 * @see https://developer.surveymonkey.com/mashery/get_respondent_list
 * @param string $surveyId Survey ID
 * @param array $params optional request array
 * @return array Results
 */
public function getRespondentList($surveyId, $params = array()){}

```

**getResponses**

```
/**
 * Takes a list of respondent ids and returns the responses that correlate to them.
 * @see https://developer.surveymonkey.com/mashery/get_responses
 * @param string $surveyId Survey ID
 * @param array $respondentIds Array of respondents IDs to retrieve
 * @param integer $chunkSize optional number of respondants to fetch in each chunk. We split it to multiple requests to conform with SurveyMonkey's API limits.  If successful, the returned array is a joined array of all chunks.
 * @return array Results
 */
public function getResponses($surveyId, $respondentIds, $chunkSize = 100){}

```

**getResponseCount**

```
/**
 * Returns how many respondents have started and/or completed the survey for the given collector
 * @see https://developer.surveymonkey.com/mashery/get_response_counts
 * @param string $collectorId Collector ID
 * @return array Results
 */
public function getResponseCount($collectorId){}

```

**getUserDetails**

```
/**
 * Returns basic information about the logged-in user
 * @see https://developer.surveymonkey.com/mashery/get_user_details
 * @return array Results
 */
public function getUserDetails(){}

```

**getTemplateList**

```
/**
 * Retrieves a paged list of templates provided by survey monkey.
 * @see https://developer.surveymonkey.com/mashery/get_template_list
 * @param array $params optional request array
 * @return array Results
 */
public function getTemplateList($params = array()){}

```

**createCollector**

```
/**
 * Retrieves a paged list of templates provided by survey monkey.
 * @see https://developer.surveymonkey.com/mashery/create_collector
 * @param string $surveyId Survey ID
 * @param string $collectorName optional Collector Name - defaults to 'New Link'
 * @param string $collectorType required Collector Type - only 'weblink' currently supported
 * @param array $params optional request array
 * @return array Results
 */
public function createCollector($surveyId, $collectorName = null, $collectorType = 'weblink'){}

```

**createFlow**

```
/**
 * Create a survey, email collector and email message based on a template or existing survey.
 * @see https://developer.surveymonkey.com/mashery/create_flow
 * @param string $surveyTitle Survey Title
 * @param array $params optional request array
 * @return array Results
 */
public function createFlow($surveyTitle, $params = array()){}

```

**sendFlow**

```
/**
 * Create an email collector and email message attaching them to an existing survey.
 * @see https://developer.surveymonkey.com/mashery/send_flow
 * @param string $surveyId Survey ID
 * @param array $params optional request array
 * @return array Results
 */
public function sendFlow($surveyId, $params = array()){}

```

API version
-----------

[](#api-version)

v2

Tests
-----

[](#tests)

See /tests/all\_methods.php

License
-------

[](#license)

**No** rights reserved. *Do whatever you want with it, It's free*

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

6

Last Release

4040d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3924981?v=4)[Jerrod](/maintainers/ascension)[@ascension](https://github.com/ascension)

---

Top Contributors

[![ewaltman](https://avatars.githubusercontent.com/u/2886892?v=4)](https://github.com/ewaltman "ewaltman (7 commits)")[![oori](https://avatars.githubusercontent.com/u/200688?v=4)](https://github.com/oori "oori (6 commits)")[![ascension](https://avatars.githubusercontent.com/u/3924981?v=4)](https://github.com/ascension "ascension (1 commits)")[![brad](https://avatars.githubusercontent.com/u/1614?v=4)](https://github.com/brad "brad (1 commits)")

### Embed Badge

![Health badge](/badges/ascension-php-surveymonkey/health.svg)

```
[![Health](https://phpackages.com/badges/ascension-php-surveymonkey/health.svg)](https://phpackages.com/packages/ascension-php-surveymonkey)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k14](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
